JosephStyons
JosephStyons

Reputation: 58785

How can I tell if my SSRS report is running as a subreport?

I have a report. The report has a header. Sometimes, users view my report by itself. Other times, they view it as part of a larger combined report.

The combined report also has a header. So, in 'subreport mode' my report ends up with two headers.

I want to hide the header of the subreport, but only when it is a subreport.

I'm hoping for something like Visible=IsSubreport. Is there a way for my report to tell if it is running as a subreport? Or do I have to add a new parameter and pass it in from the outside, telling it whether it is a subreport or not?

Upvotes: 3

Views: 840

Answers (1)

Pelin
Pelin

Reputation: 966

You can add a parameter as isSubReport to you report like this:

enter image description here

And then pass "true" from the Sub report properties menu.

enter image description here

Upvotes: 2

Related Questions