Microsoft SSRS 2005 Pass Dynamic Connection String to Report

This is about how to pass dynamic connection string to Report.

Open solution right click and Add new report

Report wizard window will open

Click Next

In Select Data Source wizard, Select New Data source Option.

<Give some Meaningful Name>

And Check your Connection

Query Wizard window will open

Stored Procedure Name with Parameter.

Table Style wizard window will open. Choose corporate etc.Click Next

Give Appropriate report Name.

Finish.

Add two parameter.
Name: Server  And Database

This will build Connection String
EditàData source Edit

In connection String field add the following:

=”datasource=” &Parameters!Server.Value&;initialcatalog=” &Parameters!Database.Value.

Click OK.

Advertisements