February 16, 2018 at 7:12 pm
Linking Main/Subreport is easy... but for some reason, I can't get the subreport filter to "bubble" up, so that I can filter it from the outer report. What am I doing wrong?
I can create a filter on my subreport and make it visible, but for some reason, I can never get that parameter to hook to the parent report. What am I doing wrong?
I have a main report, Store, and then in the subreport, I have a dataset (StoreID, EmployeeName, Gender)... and I want to filter Gender from the main report. (Yeah, it's a contrived example... I was aiming at simple.) I can add a parameter to the main report for Gender, but I can't get that parameter value to pass to the subreport. I thought i could do it by setting a filter on the subreport and tying it to the report's @Gender parameter, but no joy.
June 20, 2018 at 2:18 pm
First, a word of caution. In some contexts, using sub-reports can introduce significant performance degradation. I have found that it's better to use 1 query and group results in a single table. In other words, skip the sub-report idea. I recommend you giving that some thought.
If you still want to use a sub report, here is what you do:
- Create both reports
- Add the parameter to both reports
- Add the Subreport report item to the main report
- Set the property ReportName on the Subreport report item on the main report to be the sub report
- Set the property Parameters on the Subreport report item on the main report so that the parameter value passes from the main report to the sub report
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply