Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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?
Posted
Updated 30-May-12 19:47pm
v2

1 solution

Hi Azeeth,

You can do it in two ways. Either you can check your conditions in your code behind. If evrthing is ok, thn only display the report. Or else you can write expressions for the visibility of the tables which you want to hide incase of your situations. This will load the report viewer. But can hide the tables based on the condions.

For Tthe 2nd option.
Right click on the table.
Click the tab Visibility.
Click the radio button Expression.
Wirte the expression like =iif(condition, true, false)

Happy Coding
:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900