Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: How to display different title in each page Post Reply Post New Topic
Author Message
angelyin1984
Newbie
Newbie
Avatar

Joined: 08 May 2009
Location: Malaysia
Online Status: Offline
Posts: 30
Quote angelyin1984 Replybullet Topic: How to display different title in each page
     Posted: 01 Dec 2009 at 5:04am

helo to everybody...please help! urgent....crystal report Question!

how to displaydifferent title in different pages.
For example:

i got 2 option in one report,
(1) sort by manufacturing order number(MO No)
(2) sort by finish date

Question
when user select option (1) then the report title will show then word "by MO No" and will show also From which MO No To which MO No.

Now i only know how to display the word "by MO No" but dono how to display "From which MO No To which MO No"

i only can do this to display the word "by MO No" by write this code
if {?Option} = '1' then
   "(by MO No)"
else
   "(by Finish Date)"

Report -> Selection Formula -> Record
if {?categories}='1' then
{view_Monitoring.Manufacturing order number} in {?MOFrom} to {?MOTo}
else
{view_Monitoring.Finish Date} in {?FinishDateFrom} to {?FinishDateTo}

 

Please help! How to display the From which mo no To which mo no when i choose (1) option, else if i choose option(2) then will display from which finish date to which finish date.
 
----------------------------------------------------------------------------------------------

Example report ll look like:

(1)by Mo No

Manufacturing Report (by Mo No)
From 53010 To 53020

Stockcode      MO No              Description
abc1234        53010               aluminium can
cde4321        53011               big can

----------------------------------------------------------------------

(2)by Finish Date

Manufacturing Report(by Finish Date)
From 01/Jan/2009 To 31/Jan/2009

Stockcode      MO No              Description
abc1234        53010               aluminium can
cde4321        53011               big can

----------------------------------------------------------------------

Question is asking how to display the red part.

IP IP Logged
angelyin1984
Newbie
Newbie
Avatar

Joined: 08 May 2009
Location: Malaysia
Online Status: Offline
Posts: 30
Quote angelyin1984 Replybullet Posted: 01 Dec 2009 at 5:07am
thanks in advance....Big%20smile
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 01 Dec 2009 at 7:30am
Since the to/from is on a second line, you may want to do is as a separte formula.  The trick is that the the paramters you're using need to be converted to text in order to use them in the label.  So, your formula will look something like this:
 
if {?Option} = '1' then
   "From " + ToText({?MOFrom}, 0) + " To " + ToText({?MOTo}, 0)
else
   "From " + ToText({?FinishDateFrom}, "dd/MMM/yyyy") + " To " + ToText({?FinishDateTo}, "dd/MMM/yyyy")
 
I don't have Crystal on this computer so I'm not absolutely certain about the syntax for the date format - you may need to look it up under ToText in Help.
 
-Dell
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum