Search code examples
c#report-viewer2010

Column total on sub report for displayed rows


I'm working on a time sheet report that will display day by day punch records for the employee and then total out their hours for the week. The master report is a list of all employees and their demographic information. The sub report is a list of each days punch in and out information. When I put a sum at the end of the total time column, it sums all of the time for all employees sub report records.

I want it to display the sum of the column just for this employee.

What am I missing to make this work?


Solution

  • The answer turned out to be to filter the dataset for the one employee needed in the subreport at that time. Apparently the MS reporting software doesn't filter based on the subreport criteria. I used a LINQ query against the datatable to get the employeeID that comes as part of the subreport handler. Now the sum calculation is correct.