How to dynamically set a data source in Reporting Services?

I am looking for a way to change the data source for a report in SQL Server Reporting Services.

Basically, what kind of functionality I'm looking for is a drop-down box (parameter) at the top of the report, which allows the report user to select a different data source to run the report (so when the dropdown is changed and the report is displayed, it launches the same report, but differs from another data source).

Is there any way to do this?

+4
source share
1 answer

If you reference SQL Server Reporting Services, you can have only one data source (local or shared). You should get a trick, for example, to have a stored procedure, to return different data sets based on a parameter that may be associated with a drop-down report.

See (SQL 2000 links, don't know which version you are using):

If on the other hand you are happy to use (IMHO much more flexible) a report viewing control (either a version of the Web or WinForms), then you can present any user interface that you like and generate any data that you like based on user interaction and just make the viewer display the output for you using the same engine. The big difference is that all the work is done by the client (which for the web application is your web server, not the database server).

Cm:

+3
source

All Articles