SSRS Report - Dynamic Connection String and Parameters

荒凉一梦 提交于 2019-12-09 12:09:20

问题


I am building a SSRS report portal to run various reports. One of the requirement is to pass the database connection string (server name, database, username and password) dynamically to the report.

Please let me know how to achieve this. I am new to SSRS report.

Thanks Sri


回答1:


You should make sure that your datasource is embedded in the report.

And you can set your Connection string dynamically using an expression.

There is some more information on dynamically setting connection strings Here




回答2:


You can use parametr and experssion for connection string of datasource

="Data Source=Server;User ID=sa;Password=sa;Initial Catalog="+Parameters!Database.Value


来源:https://stackoverflow.com/questions/19827625/ssrs-report-dynamic-connection-string-and-parameters

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