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

Creating Dynamic Columns in SSRS 2008 Expand / Collapse
Author
Message
Posted Wednesday, March 2, 2011 1:32 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, September 11, 2013 12:42 PM
Points: 15, Visits: 87
Hi

I am trying to create a dynamic report in ssrs 2008,
based on the selected parameters i need to populate columns
for ex in questionno parameter if i select questions 1,3,5,7
then 4 columns has to be populated in the report ie based on the number of questions selected so many columns has to be added to the report
also my sp is dynamic so can you please give me some idea to create such report.

Thanks in Advance,
Sweatha
Post #1072173
Posted Wednesday, March 2, 2011 3:39 PM


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: Wednesday, April 30, 2014 12:57 PM
Points: 576, Visits: 692
The easiest way I could see doing this would be to return all columns regardless of what the user selected (having them in the table at least..not necessarily populated, which you can handle with your SP). Set an expression for the Hidden attribute on each optional column of the table to check whether the parameter is checked or not. If it's checked, don't hide. If not checked, hide. etc.
Post #1072253
Posted Thursday, March 3, 2011 7:09 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, September 11, 2013 12:42 PM
Points: 15, Visits: 87
Smith, thanks for the response, its and idea but i have 104 columns and 32 tables
user might select from any of those columns so its not that easy to populate all those and hide the remaining as the join itself might take so long to execute
Post #1072524
Posted Monday, August 22, 2011 6:59 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, December 17, 2012 3:36 PM
Points: 4, Visits: 31
Did anyone ever give a solution to this report? I have the same situation. Thanks.
Post #1163257
Posted Tuesday, August 6, 2013 5:04 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, August 15, 2014 1:02 PM
Points: 12, Visits: 79
I have a similar issue. I have a stored proc which creates sql dynamically and I have no idea which columns will be returned.
I need to create a report that will display all columns executed by the sql (similar to how SSMS displays the data in the grid).
Does anybody know how to do this?
Post #1481610
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse