sylbae
sylbae

Reputation: 87

Target different servers with different values

I have a SSRS project developed in BIDS. This project is uploaded to two different SSRS servers targetting two different environments.

Most of the report content is the same but I must deal with a few differences to be maintained betwwen both environment:

  1. SSRS server URLs are different
  2. Datasources are different
  3. A few reports must have a different parameter default value
  4. A few datasets must have different values in SQL query

For #1 --> I use two different Visual Studio / BIDS release modes with different configurations.

For #2 --> data source config is quite static since the initial config, and I've set the report to prevent overriding the data source --> this work around is acceptable.

Any idea for #3 and #4? Ideally, it should automaticaly change to the right value depending on the selected BIDS release mode.

Upvotes: 2

Views: 148

Answers (1)

Jeroen
Jeroen

Reputation: 63729

Item 3 is simple: once deployed the parameters and corresponding settings will not be overwritten by re-deploying the report. This is specified behavior of SSRS. For more details see for example my answer to a question about that behavior. You change parameters and their settings not by re-deploying, but for example through the report server's web frontend.

In item 4 I'm not entirely sure what you mean by "different values in SQL query", but for customizing the SQL query per environment there are multiple options:

  • Use the ReportServerUrl global, perhaps inject it in the query and make the query respond to the different values.
  • If your actual databases are different too, you could also create a view or stored proc that's called from your dataset, and make the view/proc behave different on the two environments.
  • Use a hidden parameter that differs between the environment (see also my comment on point 3) and use it in your SQL query.

Upvotes: 1

Related Questions