Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Group Records Post Reply Post New Topic
Author Message
Araqnid78
Newbie
Newbie


Joined: 26 Jul 2010
Online Status: Offline
Posts: 3
Quote Araqnid78 Replybullet Topic: Group Records
     Posted: 02 Sep 2010 at 11:06am
In my select report (group selection), I would like to select only records from each group (in this case start and end dates) where the start date is > the previous end date +2.

My group selection formula works for returning records that have more than one start date - end date record, but this is where I'm stumped:  How to add an additional check for the above?

Group selection criteria:
maximum({Duty.END_DATE}, {Patient.PTIDNUM}) <> minimum ({_Duty.END_DATE}, {Patient.PTIDNUM})

From the above, only return records where the Duty.Start_Date > Duty.End_Date +2

Group:
Start Date          End Date
1/1/10                1/10/10
1/12/10               1/20/10

The above group of records would meet the criteria, but how to accomplish this is the group selection formula is beyond me.  Help!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Sep 2010 at 4:53am
I do not think that you would not be able to use a select statement for that because you are evaluating row by row for this and not group level data.
You can use a suppress condition but not select
NOT(dateadd('d',2,duty.Start_date)>previous(duty.end_date))
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