Feeds:
Posts
Comments

Archive for February, 2012

I have a report that has 12 sections. Each section contains a textbox and a tablix. Some sections need to be hidden when a certain report parameter is selected.

Originally, I have used the “NoRowsMessage” attribute in the Tablix to display a message when no rows of data are available, and set the rule in the visibility property of the Tablix:

=IIF(CountRows() = 0, True, False)

When the report is rendered, the message appears when there is no data and the tablix is hidden, however, it does not remove the white spaces, as depicted in the screenshot below. I am not sure if this is a bug in SSRS2008R2 only.

When the NoRowsMessage is removed but the visibility rule remains, the tablix is hidden and the white spaces are suppressed, however, the  message is no longer displayed when there is no data. In order to get the message displayed, the workaround is to create a new tablix with the following expression i.e. when the RowCount is zero, display the message, otherwise display none. Leave the visibility and the row visibility of the tablix to “Show”.

=IIF(CountRows() = 0, “There were no Audits registered this month.”, “”)

Hope this helps anyone who encounters the same problem as this took me at least 4 hours to figure out what the hell is going on 🙂

Read Full Post »