Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Previous/Next Record Selection

Status
Not open for further replies.

GMAN33

IS-IT--Management
Dec 4, 2002
115
US
Hi All

Using Crystal Reports Developer 11 and Oracle 8 DB

I have a report that lists medical events for patient dosages

The data in the one table (AE_DOSAGES) looks like this:
Code:
SEQ NO   PATIENT    FROM DATE    TO DATE 
1         ABC        03JAN08     05JAN08
2         ABC        08JAN08     12JAN08
Each patient can have one record or two records if there was a break in their dosages like above. For those that have two, I would like to take the first FROM DT and the second record's TO DATE and show only one record for each patient all while also keeping the patients that have the one record

I have the report grouped by patient and seq no and was trying various previous and next if/then formulas without success.

Any help would be appreciated

 

Group by PATIENT, then, in the group footer (or header) insert a Minimum summary on the FROM DATE and a Maximum summary on the TO DATE. You could also show the count of the SEQ NO if you need that info at the group level as well.


 
Note that grouping has to be done using the values of a single detail line. To make it more selective you need to further select on some feature of the group, as with mocgp's answer.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top