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

5 comments:

  1. Do you know how to display a zero for rowcount in a textbox in pagefooter if no data return for dataset.

    ReplyDelete
  2. YOu could use CountRows() or Count() function in the footer to retrieve the number of row. See my new blog entry: http://fendy-huang.blogspot.com/2012/03/display-no-row-information-in-ssrs.html

    ReplyDelete
  3. To give display to this internal report they are trying many new things to apply.So that people must like their effort and give that a new shape.Good luck to them.



    Computer Memory Cooling

    ReplyDelete
  4. Really it is a great post in all. I got authority for this article in this site. Because i read this post attentively and acquire some useful information.
    Computer Store

    ReplyDelete
  5. how to hide the footer properties when find no data in SSRS 2008 R2.?

    ReplyDelete