sanepete
sanepete

Reputation: 1120

How do I hide each head and body sections of an SSRS subreport, if the subreport body dataset contains zero rows

I have an SSRS report which passes one of it's parameters and a generated dataset of ids to a sub report.

There are two queries in the sub report, both of which require the passed parent parameter and the dataset of ids. These produce a head dataset and a body dataset to populate the subreport.

As the subreport accepts a list of multiple ids, the sub report renders multiple head sections with multiple rows of results in the body section below each head section.

For EACH id passed to the subreport, how do I hide EACH head AND body sections of the subreport, if the subreport body dataset contains zero rows?

The end result being no head section rendered in the subreport with empty rows beneath it.

I have too many failed attempts to list as prior research here.

Upvotes: 0

Views: 205

Answers (1)

Jesse
Jesse

Reputation: 873

I would try an expression in the visibility setting of the section you want hidden. So something like =Iif(CountRows("MyDataset") = 0, true, false).

Upvotes: 1

Related Questions