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!

Can I have two different most current data show in same record? 1

Status
Not open for further replies.

kate8

Programmer
Feb 14, 2001
184
US
Hi,
I am working on a report which needs to show the information in patient’s most current appointment. So I group the patient, and then sort appointment date decently, show all data in the Group Header. But the problem is that I also need to have patient’s most current lab test showing. Some patients don’t have lab test in the most current appointment, for example, patient A had a app on 05/22/2012, then all the info from that app will show in the report, but his most current lab test was 01/22/2012, the report also need to show that result for his record. Now the most current lab field is blank for this patient since the records are sorted by the most current appointment date.
After sorting by appointment date, can I also have another most current date showing? Is it possible in Crystal Reports? How can I do it?
I am using Crystal Reports 2010 and SQL Server 2008.
Thank you so much for any suggestions and helps!!!
 
Create a formula:

if not isnull({table.labfield}) then {table.date}

Use this as your sort field, descending. Then add the lab field to the group header.

-LB

 
lbass,

Thank you so much!!! It is working perfectly.
You are great as always.

Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top