A report needs to be run on multiple sites, each with its own connection string. These site names and connection strings are stored centrally.
I want to make a report that
- Accepts the site name as a parameter
- Queries for the sites connection string
- Uses the sites connection string to get the report's data
I've tried using two data sources in the report, where the first data source uses the site name parameter to retrieve the connection string and the second uses an 'embedded connection' with a function for its connection string.
=First(Fields!ConnectionString.Value, "SiteDetails")
However when I run the report I get:
[rsFieldInQueryParameterExpression] The expression used for the parameter ‘SiteDataSource’ in the dataset ‘SiteDataSource’ refers to a field. Fields cannot be used in query parameter expressions.
Is there a way around this, to use a connection string from a database?
I am using SQL Server 2008 Reporting Services.