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

Extracting the Maximum date 1

Status
Not open for further replies.

bcmom90

IS-IT--Management
Mar 15, 2006
5
We use Crystal 9 to build reports from an HR database. The database holds multiple records for each employee for every change whether it's an open enrollment selection, job change, supervisor change etc. I need to extract the latest information based on a 'modified date' for our 2006 open enrollment choices. Depending on how long the employee has been enrolled, we can have records for the same medical plan for several years. There is a 'modified date' which tells the latest information, however I cannot seem to extract only that information. If I use the MAX function, I get an error message. Any suggestions?
 
If you only want the most recent record per employee, insert a group on employee ID and then go to report->selection formula->GROUP and enter:

{table.date} = maximum({table.date},{table.employeeID})

If you then need to do any calculations, depending upon the calculation, you will need to use running totals, since inserted summaries would include non-group selected records.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top