Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Creating Dynamic Columns in SSRS 2008


Creating Dynamic Columns in SSRS 2008

Author
Message
sweath
sweath
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
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
Derrick Smith
Derrick Smith
Mr or Mrs. 500
Mr or Mrs. 500 (594 reputation)Mr or Mrs. 500 (594 reputation)Mr or Mrs. 500 (594 reputation)Mr or Mrs. 500 (594 reputation)Mr or Mrs. 500 (594 reputation)Mr or Mrs. 500 (594 reputation)Mr or Mrs. 500 (594 reputation)Mr or Mrs. 500 (594 reputation)

Group: General Forum Members
Points: 594 Visits: 715
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.
sweath
sweath
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
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
Bill Jones-317510
Bill Jones-317510
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 31
Did anyone ever give a solution to this report? I have the same situation. Thanks.
rlevine
rlevine
Grasshopper
Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)

Group: General Forum Members
Points: 12 Visits: 85
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?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search