8

We have a SSRS report which shows the result of a dataset in a tablix. If the query in the dataset returns no data, the header of the Tablix gets displayed but not the tablix cells below the header. I know there is a property to NoRowMessage, but in fact it is not what we want. Because when I specify a message, SSRS shows the message instead of the empty tablix.I must show the tablix structure as it is, but with empty cells.

I even set the rule for each cell value of the tablix using IsNothing function, to show blank (""), if the value is null, but it didn't help.

Do you have any idea? Thanks for your help in advance.

8

You can add a row outside of the outermost group right under the tablix header row.
enter image description here

Set the row visibility to Show or hide based on an expression. The expression would like like:

=iif(CountRows("DataSet1") > 0, true, false)

When there is no data, the table will show the headers and empty row.

enter image description here

When there is data, the empty row will be hidden.

  • Great Solution! Just FYI - CountRows("DataSet") > 0 will resolve to True or False by itself, so you don't need to wrap in the iif statement, just let it resolve. Also, if you've filtered the Tablix in any way, this will count the number of rows in the original dataset. To get the count of rows in a filtered tablix use =COUNT("Fields.[pick any field].Value") or drop the "datatable1 and use CountRows() – KyleMit Aug 31 '17 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.