Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Data will not show in Group Header but... Post Reply Post New Topic
Author Message
meuyfsae
Newbie
Newbie
Avatar

Joined: 08 Apr 2010
Location: United States
Online Status: Offline
Posts: 4
Quote meuyfsae Replybullet Topic: Data will not show in Group Header but...
     Posted: 04 Jun 2010 at 1:27pm

I have a column that stores the event_type "S" and "D" and another column with the date of event,  but I need to seperate the S's from the D's then show the event date. So I created the follwoing formulas for each type.

If {event_type} = "S"
then {event date}
 
if {event_type} = "D"
then {event date}
 
The formula's work but when I moved both columns to the group header row.. only column"S" will show the date and column "D" does not. However, the "D" date will display in the footer. 
 
How do I get the date to show for both "S" and "D" on the group header for the customer?
 
Thanks for your help.
 
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Jun 2010 at 4:03am
the issue is that the group header reads whatever record it is on...so if it is an 'S' record, it would display the S date and not the D date (as it doesn't exist).  You can try an aggregate like MAX or MIN in the group header.
 
HTH
IP IP Logged
meuyfsae
Newbie
Newbie
Avatar

Joined: 08 Apr 2010
Location: United States
Online Status: Offline
Posts: 4
Quote meuyfsae Replybullet Posted: 07 Jun 2010 at 7:05am
Thanks HTH,
 
I have one customer that has both "S" and "D". What I need to show in the group hearder is the Maximum date for "S" and the Mimimum date for "D" for that client. 
 
Any other ideas?
 
Thanks
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Jun 2010 at 8:57am

the only reliable way (without using a stored proc) is to use a subreport to that you can programatically go row by row and increment the date values based on the S or D.

Shared variables can pass the values from the subreport back to the main report (or you could display the subreport).  Once you have everything working, and you are using shared variables, you probably don't want to see the subreport, so...place it in its own section, suppress all the fields in the subreport and in section expert for the main report section the subreport is in, check the suppress if blank option (hopefully I got it right, DBlank can correct me if I missed anything).
 
 
IP IP Logged
meuyfsae
Newbie
Newbie
Avatar

Joined: 08 Apr 2010
Location: United States
Online Status: Offline
Posts: 4
Quote meuyfsae Replybullet Posted: 07 Jun 2010 at 11:22am
Thanks HTH,
I'll give the subreports a try...
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