Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Displaying of table columns in SSRS sub report Expand / Collapse
Author
Message
Posted Tuesday, October 22, 2013 1:11 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Wednesday, July 20, 2016 7:52 AM
Points: 666, Visits: 1,377
Hi,

I have a problem regarding the displaying of table columns in SSRS sub report.
Only if the data is available, the sub report table report element displays.
I want it to be shown, even if data is unavailable.
Any solution available for this scenario.
Post #1506987
Posted Tuesday, October 22, 2013 2:24 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 8:33 AM
Points: 251, Visits: 1,891
Hi George,

I've come across this problem before. What I did was to add an extra dataset to the subreport that always returns a value i.e.

SELECT 1

You don't have to add any fields from the dataset onto the report, I presume SSRS detects that there are rows returned. You should now see that the column headers appear in the subreport whether or not there is any data in the table.



Post #1507012
Posted Tuesday, October 22, 2013 7:49 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Wednesday, July 20, 2016 7:52 AM
Points: 666, Visits: 1,377
Thank You, it has worked for me.

Also, it is showing the table headers now, Is there any way to show one empty row under that, for tables with no value.
Post #1507151
Posted Tuesday, October 22, 2013 9:58 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 8:33 AM
Points: 251, Visits: 1,891
It feels a bit hacky but you could...

Add an empty row to the table in your subreport, outside of the Detail group and use an expression for the row Visible property like:

=RowNumber(Nothing) > 1

Works on my test report.
Post #1507230
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse