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

Displaying last record of a group

Status
Not open for further replies.

JerryJay

Technical User
Jan 27, 2006
24
US
I am currently using Crystal 8.5 and have a table that contains training information. Within this table I have a field that contains names of training classes which is populated by a choice list stored in a separate table.

I want to display only the last record for a class, for example if I have an employee who took training class 1 first in 2005 with an expiration date of 10-20-2006 and then took the class again with an expiration date of 10-20-2007 I only want to display the 10-20-2007. My report is set to display anything that is about to expire within 30, 60 or 90 days. I also want to see any current employee who has expired training. The report returns what I need but currently returns the old records also.

I attempted to place a formula in the group selection like this but I still get incorrect results.

{ETraining.EgStatusDate} = Maximum ({ETraining.EgStatusDate}, {ETraining.EgClass})

EgStatusDate is my expiration date.
 
In what way are the results incorrect? Please explain. What is the group structure of the report?+

You could try sorting in descending order by date, and then placing the fields in a group header section and suppressing the details. Might meet your needs.

-LB
 
I have the report grouped by class. If I leave max statement out the report returns all records even those records that have expired and then been replaced by a new record.
 
If you use the group selection formula as stated, your display will only show the most recent record per class. However, other records will still contribute to summaries, though not visible. Can you be more specific about the problem?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top