We have a basic BAQ report that shows daily clock in hours for employees, such that the tablix breaks by Employee ID, and each page shows just one employee’s table of data (with one row for each day).
We’d like to add in, for each employee, another table that shows the breakdown of hours by job with indirect labor, for the same selected time period. Is it possible to insert this in a subreport that breaks in the same manner as the main report?
You could make the employee a parameter passed to the sub report, then that would only print that employees info in the subreport. Just put the subreport within the group that you break the employee on.
@ckrusen Thanks very much Calvin, it might have never occurred to me to put the subreport within the tablix itself. But now, why is some of the data not coming through? When I run just the subreport for a particular employee, I get this, which is correct:
Then when I run the full report, I get this…
It cuts off two of the production rows and doesn’t add up all the indirect labor time. What’s going on?
Further detail if it helps: the subreport is not a BAQ, it’s queried directly within the report builder itself and is parameterized for StartDate, EndDate, and EmpID.
The main report, however, is a BAQ report, and the BAQ is not parameterized. The dates are set via the Option Fields in the BAQ report designer.
When I insert the subreport, the parameters are linked as
StartDate = First(Fields!LaborDtl1_PayrollDate.Value, “BAQReportResult”)
EndDate = Last(Fields!LaborDtl1_PayrollDate.Value, “BAQReportResult”)
EmpID = [EmpBasic_EmpID] (where the groups are breaking)
Sort of, yes. We want the first page to look like this:
The second to look like this:
And so on. The problem is apparent for that second employee: if I add up his daily hours, I get
57.51, which is correct. But in the lower section, the breakdown by production/indirect, the total is only 28.66. Furthermore, when I run the subreport on its own for this employee, I get everything:
Two rows of production time don’t come through to the main report, and some indirect time is missing as well.
The subreport might need to go into a “footer” row of the group containing the Employee.
Think of it like a summary line (but will be the whole sub-report) below the details in the group (your EmployeeID).
And I don’t think you need the dates as parameters to the subreport. Probably don’t need them in the main report, unless you just want to display them in the report header. My thoughts is that the data in the BAQRResults_GUID table is already limited to your date range.
Okay. So the BAQ returns all the hours and the paarameters are used to filter in the RDL. I thought the params were being used by the BAQ to only return the hours within the date params.
As for the placement of the Sub report, I’d need to see what the groupings you have and where they are. If tit is in the Footer of the employee group, it wouldn’t interfere with the main report, and just show up once after the main report’s details for that group are printed.
One thing I don’t like about SSRS (and ther are many!), is that you can’t add a footer to an existing group that doesn’t have one. You have to include it at the time the group is created. Same for group headers. So I always include a header and footer when making a group - then hide them.