A shared data source is a set of data source connection properties that can be referenced by multiple reports, models, and data-driven subscriptions that run on a Reporting Services report server .
It is created once and used in multiple reports. It provides an easy way to manage data source properties that often change over time , we change data source at one place and it will reflect in all the supporting reports.
Lets Create a new project First, After creating a blank project the solution explorer looks like below.
Now Right click on Shared Data Sources Folder in Solution Explorer under Project solution .
Then Click on > Add > New Item…
After Clicking on New Item.. , a Add New Item Window appears.
then Select > Data Source > give name to Data Source , Name > then Click on Add Button.
Once you click on Add button , a shared Data Source Window Appears.
Now In General Tab > Set Name: >Set Type: Microsoft SQL Server >Next , Click on Build.. button
After clicking on Build.. button , a connection properties window appears.
By Default Data Source is auto filled – Microsoft SQL Server(SqlClient) , no need to modify it
> Next , Choose Server name: > then , Set Authentication: you can choose either window authentication or SQL Server Authentication(need to pass credentials).
> Next, Select Database name: > Finally , click on Test connection ( to ensure connection is created successfully or not)
After clicking on Test Connection , a pop up window appears to ensure that connection is created successfully or not.
> Click on OK button to close the pop up window > Next ,Click on Ok button
Once we click on OK Button , we get back to shared Data Source properties window , here we notice that now connection string which we have created is appears in connection string text box.
In Credentials Tab , We can set the credentials properties for Reports
- Use Windows Authentication: By default it is auto checked ,It will use the current user windows credentials to connect to the data source.
- Use this User name and Password: If we set this then the report will use username and password to connect to the data source.
- Prompt for credentials: When the report is connected to the data source, it will prompt the given text (asking for credentials).
- Do not use credentials: Report will not use any credentials to connect with the data source.
Next , Click on OK Button to finish final step.
Now we can see solution explorer , Data source is created inside shared data source folder.
2,648 total views, 2 views today