SSRS – Hide textbox if no data

SSRS – Hide textbox if no data

Within SQL Server Reporting Services 2008, hiding a tablix is simple when there are no rows in the dataset. Simply add this expression to the tablix Visibility:

= IIF(COUNTROWS() > 0, FALSE, TRUE)

However, I had the need to also hide a textbox and horizontal rule that were acting as headers for this tablix. They are out of scope, but they can be referenced with your dataset and visibility value set like so:

= IIF(COUNTROWS("DataSetName") > 0, FALSE, TRUE)

Hope this helps!

Mike250

Australian. Sport. Passionate Cricket Fan. Go Pro. Abseiling. Snorkeling. Travel. Golf R. SQL Server Developer. Three sons. One daughter. Last Trip: New York.

Related Posts
Leave a comment

Your email address will not be published. Required fields are marked *