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

Summing a Cross-Tab ROW 1

Status
Not open for further replies.

joatmofn

Technical User
Jan 12, 2003
72
US
I have a cross tab query that is used with a report. I need to sum the row of data but am not sure how to do it.

The query is used for weekly time sheets for a group of employees. It is date ranged 7 days at a time and lists employee name, and hours worked for each given day within the date range, eg., Mon: 7.5 hours, Tue: 8 hours, etc. I need a final column in the report to show the total hours worked for the employee.

The final column is what I'm having trouble with.

Some specifics of the hours table: in this table are employee id (links to the employee table), WorkDate, TimeStart, and TimeStop. Other fields, exist, but these are the pertinent ones for time calculation.

The existing cross tab query uses an expression with the start time and stop time fields and accurately reports the total hours per day per employee.

I need the total hours per week per employee along with the daily totals. Here's the format:

Emp, Sun Mon Tues Wed Thr Fri Sat Total
Sam 8.0 7.5 8.0 9.5 5.0 8.0 0.0 46.0

Any advise/help on determining and reporting the TOTAL column would be appreciated. Thanks.


 
Copy the expression from which you are setting the Crosstab Value into a new Row Heading field in the query design. Example:
[tt]
Field: | Hours | Total: Hours
Table: | Table1 | Table1
Total: | Sum | Sum
Crosstab: | Value | Row Heading
[/tt]

See if this works for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top