Run Reporting Service in local mode and generate columns automatically?
Posted
by grady
on Stack Overflow
See other posts from Stack Overflow
or by grady
Published on 2010-06-09T11:58:48Z
Indexed on
2010/06/09
12:02 UTC
Read the original article
Hit count: 205
Hi, I have a SQL query right now which I want to use with the MS reporting services in my ASP.NET application. So I created a report in local mode (rdlc) and attached this to a report viewer. Since my query uses parameters, I created a stored procedure, which had exactly those parameters. In addition to that I had some textboxes which are used for entering the params for the query and a button to call the stored proc and to fill the datatset which is bound to the report viewer. This works, I press the button and according to what I entred the correct data is shown.
Now my question: In the future I plan to have multiple reports (which will be selected in a dropdown) and I wonder if I can somehow just call the correct stored procedure and according to the columns which are *SELECT*ed in the procedure, the columns are shown in the report.
Example: I select report1 from the dropdown (procedure for report 1 is called), 5 columns are shown in the reportviewer. I select report2 from dropdown (procedure for report 2 is called), 8 columns are shown.
Is that possible somehow?
Thanks :-)
© Stack Overflow or respective owner