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!

Record Selection based on group total problem 2

Status
Not open for further replies.

VJSTim

Technical User
Dec 4, 2004
6
US
I am using Crystal 8.5 and SQLServer 2005.

I have a table with labor records. Each record includes: a date stamp, and employee ID, and hours worked. Employees may have multiple labor records on the same day.

The report I am trying to write will print employees whose record totals for one day exceed 8 hours. This is not problem when the employee works on one job for more than 8 hours. My problem occurs when the employee works on 2 or more jobs in one day and the total adds to more than 8 hours. I've tried grouping by date, then employee and summing the hours worked to a group footer. Then I suppress the detail and use section visibility to display only those when more than 8 hours. This is not working. Any help would be appreciated.

 
So if you want to see the employees thet worked a day more then 8 hours in a job, the records should be grouped by Employee, then Date and then Job, and then suppress the unneeded records.

-------------------------------------------------------------------------------------------------------------------------
"Now I can look at you in peace; I don't eat you any more." Franz Kafka, while admiring fish in an aquarium
 
You should be able to use your original method, with a suppression formula like this:

sum({table.hours},{table.employee}) <= 8

Add this to all sections you want suppresssed in the conditional formula area. Or, use group selection (report->selection formula->GROUP and enter:

sum({table.hours},{table.employee}) > 8

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top