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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top three rowsa

Status
Not open for further replies.

anish95

Programmer
Joined
May 18, 2009
Messages
4
Location
US
Hi:
I am trying to run a report patients and their recent three lab values, group the report by unit and under group I want to see only three recent values for each patient.
my report should look like this

Patient Name Date Lab Value
Nursing Unit 1
Patient 1 5/21/2010 54
Patient 1 5/20/2010 50
Patient 1 5/19/2010 49
Nursing Unit 2
Patient 2 5/20/2010 35
Patient 2 5/20/2010 45
Patient 2 5/19/2010 40

I really appreciate your help and time.
Thanks
 
Group by unit and then by patient. Sort by date descending. Then insert a running total {#cntwingrp} that does a count of any recurring field, e.g., patientID, evaluates for each record, and resets on change of group: Patient.

Then go into the section expert->details->suppress->x+2 and enter:

{#cntwingrp} > 3

-LB
 
Thank you very much lbass. It works fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top