Show message "NO DATA FOUND" in SSRS report

Prashant Khadatkar picture Prashant Khadatkar · Mar 3, 2014 · Viewed 12.3k times · Source

I have created SSRS report having 3 columns in it. Now, I have to show "NO DATA FOUND" message below report header. How can I achieve it. I cant not use report property "NO ROW" as I have to show Report Header also.

Followings are the fields in my Report tabix:
ContentId,
Version
ApprovedBy

I have tried following to show "NO DATA FOUND" message:
In Tabix textbox, I have added expression:
=IIF(Count(Fields!ContentId.Value)=0 OR IsNothing(Fields!ContentId.Value)=true,"NO DATA FOUND.",NOTHING)

But, It is not working. Please suggest me, where I am doing wrong. Thanks

Answer

BIReportGuy picture BIReportGuy · Nov 23, 2016

You can do the following if using a table...since the table doesn't have the NoRowsMessage feature:

1. Add a text box with expression =IIF(Count(Some Field,"DataSet1")=0,"No Data Returned", nothing)

2. Then, set the visibility of this textbox as =IIF(Count(Some Field,"DataSet1")=0,False,True)