Reputation: 135
I can hide a table with no data by using this function in the visibility expression - =Iif(CountRows() > 0, false, true)
But I have a textbox used as a heading for the table. How do I hide the textbox if the table relating to it has no data?
Thanks
Upvotes: 2
Views: 3822
Reputation: 3038
=iif(countRows("DataSet2") > 0, false, true)
Where DataSet2
is the name of your dataset. This is because you are now informing the expression to Count the Rows in DataSet2. As no rows exist, it is set to hidden.
Further information...
Is the heading for the table adjacent to the table? Are you aware you can add rows above a table to provide extra heading information?
For example you can Right Click the Row Header, Select Insert Row -> Above and a new Row appears. You can then merge the cells horizontally, and set a title for the table (for example)
Now when you set the table to be hidden, this header row is also hidden automatically.
I'm not sure this is applicable to your situation, but I thought it might be useful to add, to reduce the complexity of your report, if you were unaware of the possibility
Upvotes: 3