Sunday, August 11, 2013

SSRS - How to add custom message in report when there is no data available

1.     Background

The purpose of this document is to describe a way of showing custom message in the report if there is no data available for the report. We will use “No Row Message” property of the tablix data region.

2.     Steps to add Custom Message for Report in case of no data return by dataset:

                                i. Below is a sample Sales Report having Year and region wise sales data:

                              ii.   Now change the dataset query in such a way that it should not return any data:

                            iii.   Execute the dataset query and check that it should not return any data:
No data is coming from data set.

                             iv.  Now run the report. Report is not showing any data.

Showing empty tablix report may confuse the users. So it is much better to show a custom message when there is no data for the report.

                               v.    To implement custom message, select the tablix data region and go to the property. Right custom message in “NoRowMessage”. We can change the font and font color also.

                             vi. Now Run the report
                    Now we can see the custom message in the SSRS report.

3.     Conclusion

         By using above steps, we can add custom message in SSRS report in case when there is no  
         data  returned by dataset.

1 comment:

  1. Everyone can write, can't they? After all, you learned how to write in school. So getting writing jobs should be easy. However, you soon learn that writing is a vast field, and you wonder whether you should take writing courses to help you to get jobs.