0

I have a requirement to create dynamic connection for SSRS reports where the connection information (Server & DB) will be worked out in c# code, so no interaction with end user selecting(Server or DB) Ex. i have one server and multiple databases on that so i need to change connection connection string in shared datasource for ssrs report.

please help me to create SSRS repprt to set dynamic connection string in shared datasouce using asp.net

1 Answer 1

0

One way is to pass the database name in as a report parameter. Then on the "Data Source Properties Dialog", click the Connection String's "Expression Button" (fx) and enter something similar to:

="Data Source=" & Parameters!ServerName.Value & ";Initial Catalog=" & Parameters!DatabaseName.Value & "; Trusted_Connection=True;Application Name=xxx;"

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.