Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 6:03 AM
Points: 588, Visits: 1,061
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 Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Today @ 2:49 AM
Points: 82, Visits: 678
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


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 6:03 AM
Points: 588, Visits: 1,061
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 Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Today @ 2:49 AM
Points: 82, Visits: 678
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