Hello, I am trying to use a data source expression but I'm getting an error. Here is my data source expression:
="data source=" & Parameters!ServerName.Value & ";initial catalog=AdventureWorks"
I have created a report parameter called ServerName. However, when I deploy the report and report viewer opens, I get the following error:
An error has occurred during report processing. (rsProcessingAborted) Error during processing of the ConnectString expression of datasource ‘AdventureWorks’. (rsDataSourceConnectStringProcessingError)
Is there some really obvious step I am missing here? The relevant parts of my rdl are below.
Thanks in advance
<DataSources>
<DataSource Name="AdventureWorks">
<ConnectionProperties>
<ConnectString>="data source=" & Parameters!ServerName.Value & ";initial catalog=AdventureWorks"</ConnectString>
<DataProvider>SQL</DataProvider>
</ConnectionProperties>
<rd
ataSourceID>(some stuff here)</rd
ataSourceID>
</DataSource>
</DataSources>
...
<ReportParameters>
...
<ReportParameter Name="ServerName">
<DataType>String</DataType>
<Prompt>ServerName</Prompt>
</ReportParameter>
</ReportParameters>