Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
We have a SSRS report which shows the result of a dataset in a tablix. If the query in the dataset returns no data, the header of the Tablix gets displayed but not the tablix cells below the header. I know there is a property to NoRowMessage, but in fact it is not what we want. Because when I specify a message, SSRS shows the message instead of the empty tablix.I must show the tablix structure as it is, but with empty cells.

I even set the rule for each cell value of the tablix using IsNothing function, to show blank (""), if the value is null, but it didn't help.

Do you have any idea? Thanks for your help in advance.

What I have tried:

I know there is a property to NoRowMessage, but in fact it is not what we want. Because when I specify a message, SSRS shows the message instead of the empty tablix.I must show the tablix structure as it is, but with empty cells.

I even set the rule for each cell value of the tablix using IsNothing function, to show blank (""), if the value is null, but it didn't help.

Do you have any idea? Thanks for your help in advance.
Posted
Updated 24-Feb-16 4:31am

1 solution

The IsNothing function will only work if a row has been returned. Your problem is that there is nothing to return (and therefore nothing for the function to work on).

You could use a stored procedure that does something like
SQL
IF EXISTS (select * from table3) 
	SELECT id, datum FROM table3
ELSE
	SELECT '' as id, '' as datum

Note the lack of a table in the ELSE statement - just return blanks for each of the columns you were expecting had there been data to return.

Seems a bit of a strange requirement though - if the header is being displayed then surely that is enough to display the "structure"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900