Pedram
Pedram

Reputation: 6508

Show design if Dataset not returns any row in SSRS

I've designed my SSRS Report like below,

Where First row, Third row and Fifth row has default value so I have used it as Header part for this tablix.

Now, the question is - when I run this report, it prompts to enter one number to get result. But if dataset does not returns any rows then I just want to show designed header part only? But currently it is not showing anything. What could be the problem or any solution to get only designed header part?

Please help me!

Note: When it returns the rows it is showing Records as well as designed header part also.

Upvotes: 3

Views: 1033

Answers (2)

Pedram
Pedram

Reputation: 6508

So I tried to achieve this by many ways, it was working fine in Report Builder 3.0 but when I run this report in IE,Firefox,Chrome browser it was not showing designed report tablix. If there would be data it will show whole report with designed header part as well as data.

1. I have created Two Tablix inside one SubReport-

  • First tablix

    Just for design. (Without data part)

  • Second tablix

    Contains both Header part as well as Data part.

Then I have Set visibility based on CountRows("Dataset") to show/hide Tablix1 and Tablix2. It was working fine in Report Builder 3.0 but not in browser.

2. This one is the final option that I have tried and I achieved my goal with this way.

I have created two SubReport.

  • 1 SubReport:

    Only designed part (Without data part)

  • 2 SubReport:

    Which contains both Header Part as well as Data Part.

Then, I have added two Rows inside my Main report Tablix. and added both reports to different row.

Then, On Row Visibility I have checked =IIF(CountRows("Dataset")>0,True,False)

And it's working fine now in all browsers as well.

Upvotes: 1

You have to add headers Outside Group in following:

enter image description here

Upvotes: 0

Related Questions