Grand Total for Footer Summaries

Stimulsoft Reports.JS discussion
Post Reply
darknasty1
Posts: 1
Joined: Thu Jan 26, 2017 8:00 pm

Grand Total for Footer Summaries

Post by darknasty1 »

I have a report that is grouped by two conditions. 1) employee name 2) WeekOfYear for timeclock punches. So for every week the employee was clocked in there will be a group band for that weeks time punches with a summation of hours worked in the GroupFooterBand.

I would now like to place a grand total for each employee that sums all the weeks hours worked. The weekly total summary expression is this:

{ (Sum(DataBand1,root.TotalMinutes))/60>(40) ?

(Sum(DataBand1,root.TotalMinutes)/60)-((Sum(DataBand1,root.TotalMinutes)/60)-(40))

: (Sum(DataBand1,root.TotalMinutes))/60}

I am doing this to handle over time caclulations.

How can I now sum all the weekly totals in the Employee group footer? I tried assigning the above to a variable and summing the variable, but that lead me to an interesting discovery. If I am grouping by WeekOfYear, on the 30th of the January we are in the 5th week of the year. If I hard code a variable to the value 3 and place it in the WeekOfYear group footer, when I Sum that variable in the EmployeeFooter, I get the 15 as a total, even if I only have databand data for weeks 2 and 3 and the report only renders 2 weekly bands. So that tells me if I rely on a variable in the Week Group, it will be calculated incorrectly because it will be evaluated for each week of the year.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Grand Total for Footer Summaries

Post by Alex K. »

Hello,

Please try to use the Totals.Sum() function in this case.
If the issue still present, please send us a simple report with test data for analysis.

Thank you.
Post Reply