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!

Need formula that looks at group totals

Status
Not open for further replies.

NewToThis2

Technical User
Mar 30, 2004
62
US
CRV9 - I have a report showing paid hours and standard hours (by employee) for a pay period entered by the user. In a group footer I am totaling the paid hours (Sum PRTIME.HOURS).

I only want the report to display records where the SUM PRTIME.HOURS is greater than the standard hours. Standard hours is a field in the detail section and each employee has a set number in this field.

Example: John has 32hours regular, 10hours overtime, 3hrs holiday for a Sum PRTIME.HOURS of 45. John's standard hours is 32 so his record would show on the report. If his standard hours had been 60 then his record would not show on the report.

Does anyone have any suggestions on how I can limit the report to just those employees whose total hours exceeds their standard hours?

The simpler the better - I'm still new using Crystal.

Thanks so much!
 
Group on {table.employee}. Then go to report->edit selection formula->GROUP and enter:

sum(PRTIME.HOURS},{Table.employee}) > maximum({Table.RegularHours},{Table.employee})

Substitute your field names. This assumes that {table.regularhours} repeats in each detail row, so that a maximum is necessary to capture the correct value.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top