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!
Leave a comment