SSRS – Create a No Data Returned Textbox

When the dataset returns no rows, a bit of U.I. certainly goes a long way to avoid any confusion for the user running your report.

Create a textbox somewhere convenient on the page, and enter this in the expression for your textbox, substituting in your real dataset and field name. 


=IIF(Count(Fields!DatasetFieldName.Value, "your_dataset") = 0, "No Data Returned", Nothing)

…then enter this in the Hidden property expression for the same textbox.


=IIF(Count(Fields!DataSetFieldName.Value, "your_dataset") = 0, False, True)

 

 

About AussieBICG

Connect with me here https://au.linkedin.com/in/aussiebicg

2 Responses

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s