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

please help with hour calculations

Status
Not open for further replies.

ericb123

MIS
Mar 3, 2008
55
0
0
US
Using CR11 and SQL Server, I have a table of claim numbers, userID's, date, and hours worked per day.

So, for example, my data looks like this:

DATE USER CLAIM# HOURS
11/11/2008 joe 12345 8.5
11/11/2008 joe 54321 8.5
11/11/2008 joe 09987 8.5
11/11/2008 joe 65432 8.5
11/12/2008 joe 23445 7.5
11/12/2008 joe 87656 7.5
11/12/2008 joe 65432 7.5
11/12/2008 joe 09087 7.5

My report is grouped by userID, then by Date for each week. So I'm trying to find the number of hours worked per day and per week. For the week it would be 16 hours (8.5 + 7.5), how can I calculate this?

I tried using a SUM, but it's adding all the 8.5's for the same day. Any help is greatly appreciated, thanks!
 
Use a running total

Field to summarize = Hours
Wvaluate = 'On chaneg of field' -> Date
Reset = On change of Group -> User

Place this in the User Group Footer

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
thanks! That works great. Is there a way to get this out of the footer and in the header? All the other fields are in the header, and when I move it there, it changes to an incorrect number.

Thanks!
 
Please explain what you did, since you could not use a running total in the header and get the correct result.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top