SJaka
SJaka

Reputation: 830

SSRS - How to hide parent report's header in a subreport?

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?

Upvotes: 0

Views: 1775

Answers (1)

grafgenerator
grafgenerator

Reputation: 819

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).

Upvotes: 1

Related Questions