TangoKilo
TangoKilo

Reputation: 1785

How do I show a row in SSRS when no data is available?

My code in the first text box in a tablix row is as follows:

=IIF(CountRows("DataSet") = 0, "Row Label", (IIF(RowNumber("ThisTablix") = 1, "Row Label", "")))

My understanding of the logic is that:

  1. If the number of rows returned in the data set "DataSet" is 0, then the row should appear with a text box that says "Row Label"
  2. If data is available in "DataSet" then if this is the first row in the tablix, the textbox should say "Row Label".

However when I attempt to run the report without any data, the row does not seem to be appearing.

Any pointers would be appreciated.

Upvotes: 0

Views: 2073

Answers (1)

criticalfix
criticalfix

Reputation: 2870

I think your point 1 is incorrect. If zero rows are returned, your textbox will never be evaluated. Look for the NoRowsMessage property, and set it. Also see this question.

Upvotes: 3

Related Questions