1
votes

Hi All I have a ssrs report with 6 tablix and all 6 using the same dataset1, but with tablix filtering for 6 unique service provider, one for each tablix.

The user selects a country from the parameter. And based on which country the user selected: Out of the 6 service provider, some of them may not be available in that country and will display a blank tablix table with only the column headers.

What I want: Is there a way to change the visibility settings so that whichever service provider tablix is empty, they would become invisible?

For example: User selects Canada:

Provider1: Available in Canada, Show Tablix

Provider2: Available in Canada, Show Tablix

Provider3: Not available in Canada results in blank tablix - Turn visibility to hide

Provider4: Not available in Canada results in blank tablix - Turn visibility to hide

Provider5: Available in Canada, Show Tablix

Provider6: Not available in Canada results in blank tablix - Turn visibility to hide

So only Tablixs for Provider 1, 2, and 5 will show on the report.

I am assuming this will use the IIF expression? I just need some guidance on what would be the best way to accomplish this.

Thank you

2

2 Answers

2
votes

You can use a similar expression to set Hidden property of a Tablix:

=IIf(CountRows("YourTablixName") = 0, True, False)
0
votes

The NoRowsMessage property of a Tablix may be useful to your needs. If the filters result in the tablix having no data to use, this will show a message instead of displaying the column/row headers. This can be static or an expression:

="No Provider3 data available for " & Parameters!Country.Value

The Font properties of a tablix (rather than the properties of it's cells) control how the No Rows Message displays.