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!

Can I print only the lastest time from a group of times?

Status
Not open for further replies.

pokerace

Technical User
May 24, 2005
118
US
How would I be able to get Crystal to only show the latest times from a list of times? For example, if my query pulls five times (10am, 11am, 1pm, 2pm, 3pm) how would I then query only he latest time?
 
Go to report->selection formulas->GROUP and enter:

{table.time} = maximum({table.time})

This would display the record(s) with the latest time in the report. If you want it per group, then use:

{table.time} = maximum({table.time},{table.group})

This will give you the latest time for the day or across days, e.g., the closest to midnight. I wonder if that's really what you are looking for?

-LB
 
I think that will do the trick. I just want to show the latest time record for my database {table.stoptime} field. However, I first grouping by last name and then first name, so I guess if I apply that second formula to the inner most group (first name) it should work.

Thanks.
 
The second formula would then give you the latest time for the person.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top