Totalling summarized fields and hiding headers before blank sections
Posted on 2013-07-02
I've got a Crystal Report which I'm having a little difficulty with. I'm looking for the best way to summarise some fields that have been grouped. The report is a payroll report such as follows:
Date Employee Clock In Clock Out Start Time End Time Hours (formula)
1/7/2013 1234 6.56am 11.40am 7.00am 11.30am 4.5
1/7/2013 1234 12.10pm 3.30pm 12.30pm 3.30pm 3
1/7/2013 3456 6.50am 3.35pm 7.00am 3.30pm 8.5
For my purposes, I need to summarise the hours worked by employee each day (so if they have 2 records like employee 1234, then I need to show only the earliest Clock in time then the latest Clock Out time & same with Start and End Time), and I need a total for the hours for which I then need to work out how much the hours are greater than the standard day ie 8.5.
I then need to summarise all of this data by Department and sum also the 'overtime hours' ie 8.5 minus whatever hours have been worked.
I also want to hide any Department headings for which there are no records underneath.
I've tried using a running sum total fields for the clock in & out and start and end times, but I'm stuck with no total for the Department, and I can't hide the Department heading if there is no record.