0

I've to create a report that must be printed along with an existing report. Since the dataset is largely the same, I've created this new report as a sub-report to the existing report, and have added a before page break. So now both the existing report and (new) sub-report print on separate pages. The problem is that the header of the existing report gets printed on the sub-report also.

Is there a way to suppress/ hide parent report's header from the sub-report?

SJaka
  • 712
  • 13
  • 40

1 Answers1

1

I guees SSRS doesn't allow to do exactly what your want, but if your subreport is on the last page, you can set PrintOnLastPage = False for report header, then it will not be printed, although I'm not sure how it will look if subreport generates many pages, I afraid that only the last of subreport's pages will be without header. In that case all you can do is hacks - you can conditionally hide all report items inside header, setting their Hidden property to smth like this =IIf(Globals!PageNumber > YOUR_PAGE_NUMBER, True, False). Or, if first part (parent report) generates unknown amount of pages, you can use PageName instead of PageNumber, and update report to change page name for subreport pages, f.e. by wrapping subreport into rectangle and specifying page name for rectangle. Expression then will be =IIf(Globals!PageName = "YOUR_SUBREPORT_PAGE_NAME", True, False).

grafgenerator
  • 679
  • 7
  • 13
  • My sub-report is just a single page. Also, I'm facing another issue. When the main report has multiple line items, my sub-report is printed multiple times. So if my main report has 11 line items, my sub-report gets printed 11 times too! – SJaka Oct 10 '16 at 13:02
  • SJaka can you post RDL template (picture at least), it's hard to say what is going on without it. But if lines located directly in report body, as well as subreport, and subreport rendered multiple times, then there may be some issues with RB's layout engine. – grafgenerator Oct 10 '16 at 16:13