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

I'm an Australian Chief Analytics Officer passionate about data science, visual insights, and all things sport—particularly cricket. An adventurer at heart, I’ve gone from abseiling cliffs to snorkeling in crystal-clear waters, sleeping in the wilds of Africa, and exploring destinations worldwide, with my latest trip taking me to Bali. When I'm not diving into data or analytics, I'm spending time with my three sons and two daughters, attempting to hit sixes for my local cricket club, reviewing chicken schnitzels or honing my craft around a coffee machine.

Related Posts
Leave a comment

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