Dynamic report datasource

  • My scenario is very similar to the one described in the following thread:

    https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=3922291&SiteID=17

    The thread seems to indicate that it is not possible in SSRS 2005. Does anyone know whether this is possible in SSRS 2008?

  • Not sure if it is available in 2008. I had a similar issue with 2005. We have over 100 customers that have the same database schema (we define it) but may have different db names/servers/passwords/etc to access the data from. Creating a report for each was not an option. We host our Report Viewer control in a web page which is part of out web application. This allows us to load the rdl and modify it before sending it to the viewer. We load it into an xml document and find the datasource(s) elements and update accordingly for the server/db that we want to run against. I have done similar things with report builder rdl files but it requires you to create a new model for each db you wish to connect to.

  • Ok cool. Changing the datasource in the rdl is an option.

    I was thinking of creating the reports with dynamic datasources (ie. the report would have the server and database as parameters) and then calling the Report Server web service (sitting behind the Report manager) directly, passing it the parameter values.

  • I think I got parameters for server and database name to work a year or so ago when I first started with Reporting Services. I can't remember why I didn't go with that option. It may be because it didn't work during design time which caused me to keep changing between a parameterized connection string and a hard coded connection string. I am not sure if you can use a shared data source or not. I need to set the username/password in the connection string so I went with modifying the rdl prior to giving it to the report viewer.

    If you are deploying the reports to the report server (which in my case I am not, I load it from a local file) you might be able to used the same shared data source for all reports and then change just the one data source as needed per installation (server/db/etc). I do this with the report builder models. They all use a shared data source and we update the connection info per installation (server/db/etc)

    Sorry, not a lot of answers but some things to try to see what works best for you.

  • Thanks for all the info. Gives me some things to look at. Cheers

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply