• Home
        • Database Development

          Database development is designing, creating a database or data model, and analyzing requirements and their intents as raw data.

          Learn More
        • Architecture & Design

          Software architecture refers to the fundamental structures of a software system and the discipline of creating such structures and systems.

          Learn More
        • Programming

          Computer programming is the process of performing a particular computation or more generally, accomplishing a specific result.

          Learn More
        • Cloud Computing

          Cloud computing is the on-demand availability of computer system resources, especially data storage and computing power.

          Learn More
        • ETL Development

          ETL provides the foundation for data analytics and machine learning workstreams. Through a series of business rules, ETL cleanses and organizes data.

          Learn More
        • Data Visualization & Reports

          Data and information visualization is an interdisciplinary field that deals with the graphic representation of data and information.

          Learn More
  • Blog
  • Contact

Handling No Data in SSRS Controls

When SQL Server Reporting Services (SSRS) successfully renders a given report control (i.e. Table, Matrix, List, etc.), the result set can either be empty (which means no data returned) or actually show data. In cases whereby an empty result set is returned, SSRS controls, such as tables and charts, use NoDataMessage and NoRowsMessage properties to inform report users of no data.

Fortunately, some SSRS controls, such as charts, that reference NoDataMessage property has by default the “No Data Available” caption to handle instances whereby an empty result set is returned. To illustrate this point – I have an SSRS dataset in my report that sources HumanResources.vEmployee object from the AdventureWorks2012 Sample Database. I have also created another dataset that will be used to populate the report country parameter.
report main dataset
[snippet id=”151″]
country parameter dataset
[snippet id=”152″]
NoDataMessage Property
I have used the aforementioned datasets to add a vertical bar chart in the report that shows the number of Adventure Works employees by country of origin. By default, the report looks as follows:
Default Report view with all countries selected

As shown in the above chart, the United States has the most number of employees working for Adventure Works. The following images show the report filtered by France and later by South Africa. Whilst a single French employee is found, there are no South African employees and thus the “No Data Available” message is shown.
Report filtered by France
Report filtered by South Africa – No Data Available

NoRowsMessage Property
Unlike controls that reference NoDataMessage property, SSRS controls that handle empty result sets using the NoRowsMessage property – do not have a default caption. To illustrate this point, we again use the dataset that determines the number of Adventure Works employees by country of origin, however, instead of using a chart control, we will display results in a table.
Table based on all countries

Again, when we filter the report by France – we are able to find a single French employee.
Table filtered by France
Table filtered by South Africa
When the report is filtered by South Africa, as shown below, no data is found – however, unlike the chart control, the “No Data Available” caption is not shown in the table. We could fix this by editing the value of NoRowsMessage property. This is done by:
Step 1:
Highlight the Tablix and view it’s properties.
Report Tablix and it’s properties
Step 2:
Set the NoRowsMessage to “Sorry, No Data”.
Setting value of the NoRowsMessage property
Step 3 (Optional):
Set the Color property to Red.
Setting value of Color property to Red
When you rerun the report by using South Africa as a filter, you should be able to see the custom no data message as shown below:
Report table control with a custom no data message

That’s it, folks. Till next time.



October 13, 2022
Sifiso is Data Architect and Technical Lead at SELECT SIFISO – a technology consulting firm focusing on cloud migrations, data ingestion, DevOps, reporting and analytics. Sifiso has over 15 years of across private and public business sectors, helping businesses implement Microsoft, AWS and open-source technology solutions. He is the member of the Johannesburg SQL User Group and also hold a Master’s Degree in MCom IT Management from the University of Johannesburg.

Meet Our Experts

We are proud to have a team of experts who are passionate about delivering the best possible solutions to you. Our team members are highly skilled and experienced in a diverse range of IT technologies, and are committed to staying up-to-date with the latest industry trends and best practices to deliver you the best results.


Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Join Our Newsletter

Subscribe to get our latest and best thinking on the most definitive workforce topics affecting HR leaders and organizations today.