How to select the Data Source at Runtime in SSRS Report Builder

2.8k views Asked by At

before going to problem let me clear that i know there are similar questions ask before but could not find the answer of my problem. my problem is:
I want to select the Data Source at runtime. First of all, i simply create a report by making a shared data source. then i create a data set using this data source. I run the report and it is working perfectly. Then I create two parameters, one for data source and one for data set. both parameters are type of "Text", their parameter visibility is "Visible" and their Available and Default values are "None". Then I created a second data source which is embedded and its connection string is :
="Data Source=" & Parameters!DataSource.Value & ";Initial Catalog=" & Parameters!DataSet.Value
Now when I click on test connection button it shows me error :
"The ConnectionString property has not been initialized."
Now can any one please explain me how to handle it. my credentials are correct. I test credentials by making embedded data source and hard codded connection string its working fine but not with dynamic connection string.

1

There are 1 answers

11
Hannover Fist On

You can't use a Shared Data Source with a dynamic data source. Use an embedded one. I think it's to prevent you from corrupting other reports' data sources.

http://www.keepitsimpleandfast.com/2012/08/how-to-use-dynamic-data-sources-in-your.html