Saturday, June 11, 2011

How to Display No Row Information on SSRS Report

When  report rendered, most users would like to see the records if there are data returned and some kind indicator or message if no data returned.  One old technique could be:

  • Add a Textbox with no data return message below the Tablix.

image

  • Set the Hidden property for the Tablix to be True if the row count equal to 0 or False if row count great than 0.

image

  • And set the Hidden property for the Textbox to be the opposite of the Tablix.

image

Here is an easy simple way to do it for SSRS 2008 by using NoRowMessage property:

  • No additional textbox needed and the leave the Hidden property for the Tablix as default which will be false.

image

  • Set the NoRowMessage with the message you would like to be displayed when no data returned.

image

  • You may set the Tablix Font properties to use the correct size or style and set the TextAlign to be Center to display the message on the middle of the report.

image

  • You could also format your message using expression as below to display them in three rows text. The “VBCRLF” is Visual Basic Carriage Return and a Line Feed function that could be used in expression to break the line.

image 

image