HI ,
I am using SQL Server 2005 Reporting Services. I have many parameters to pass to the dataset. Is there a way to change the dataset dynamically based on the parameters selected?
Suppose If param1 is selected, I want to use dataset1 and if param 2 is selected. I want to use dataset2 and so on... in my reports.
Any help is greately appreicated!
Thanks in advance!
Have you tried to use an expression in your dataset "Query String" window?
Example:
iif(param1 <> nothing,exec proc1,exec proc2)
|||It is better to handle it in your stored procedure which takes all necessary parameters.
Shyam
|||Hi Simone,
I have handled this problem in my stored procedure on SQL Server. I have created separate procedures and created a master procedure and called other sub procedures inside this master procedure based on the parameters selected on the UI. I couldn't think of this approach until you suggested to handle it in dataset expression. Since I have many parametes to handle, dataset expression didn't work for me but the idea helped me to figure out other solution.
Thank you so much for your help!
|||Hi Shyam Sundar,
I have tried it in dataset expression as Simone mentioned and didn't work and tried in stored procedure. I agree it was better to handle it in stored procedure.
Thank you very much for suggestion.
|||Can you pls mark my post as answer?|||I did. Thanks again for your help.
No comments:
Post a Comment