hrishi
hrishi

Reputation: 103

How to hide or not print a page on certain condition in .NET Reporting RDLC

I have a report where I have got three groupings.I display details' rows on certain condition e.g. I created a filter in details group where Status = True and display their total in page footer. Whereas Status = False is used for other calculations on page. So I cannot just modify the datasource query to only have rows where Status = True. All the rows are required.

Now my problem is if there are no rows where Status = True, then still the page gets generated with header, no rows and total = 0 in footer. I do not want to generate a page if there are no details displayed and the total = 0.

Is there a way we can control the conditional visibility of a page in RDLC reports?

Solution

If anybody need the solution. I resolved it by creating a filter, which skips the pages with no displayed rows. I created a filter in the top most group as

Sum(IIf(Fields!Status.Value = False,1,0)) = 0

Upvotes: 3

Views: 1980

Answers (1)

hrishi
hrishi

Reputation: 103

If anybody need the solution. I resolved it by creating a filter, which skips the pages with no displayed rows. I created a filter in the top most group as

Sum(IIf(Fields!Status.Value = False,1,0)) = 0

Upvotes: 2

Related Questions