sql server - Is it possible to specify the data source during execution of an SSRS report via the web service? -


I have only one server that hosts our production and development database SQL Server 2008 with SQL Server Reporting Services ( No R2) is running.

I am deploying a VS 2008 Reporting Services Project on the server to provide reports. All reports use a single shared data source, which currently indicates the production database.

Somewhere else the background service creates PDF reports via the SSRS web service interface.

My question is, has been given to this environment, is it possible that it is possible to programmatically change the data source used during the web service Is either a report using Dev or Production database?

I do not want to modify the definition of shared data sources or reports, I want to be able to set the name of the database before running the report and I can not see how this is possible.

I can see that the only "simple" solution is to establish another report server instance, which seems like overkill for what I want, as long as I'm doing this I do not have any clever answer.

Yes, try it: / P>

  1. Two report parameters "server" Create a "database" (you should probably create a default value so that the report should go by default)
  2. Define the data source such as expression:

    = "Data Source =" & amp; Parameter! Server. Value & amp; "; Initial list =" & amp; Parameter! Database Value

You should now be able to dynamically specify databases and servers on the runtime

Keep in mind that the underlying dataset definition is defined by each DB and The server needs to be valid, which you perform from the report.

You can also pass parameters to URL strings like:

  http: // server / reporters / dir / report & amp; RS: Command = Render and Server = VALUE1 and Database = VALUE2  

Keep in mind that these URLs are encoded and the values ​​are not labeled, and they are different.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -