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

倖福魔咒の 提交于 2019-12-01 12:53:39

问题


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:


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



来源:https://stackoverflow.com/questions/30847081/how-to-select-the-data-source-at-runtime-in-ssrs-report-builder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!