In SQL Server Reporting Services, Data Source is a connection setting used to connect with underlying Databases or Data Warehouses. In this article, we will show you, Steps involved in creating Embedded Data Source in SSRS, a practical example.
The SSRS Embedded data source is a combination of the Provider name, Server instance Name, Database Name, and Database credentials. SQL Server Reporting Services supports two types of data sources: Shared Data Sources and Embedded Data Sources.
SSRS Embedded Data Source: If you want to use the data source in single reports, there is no point in creating a shared data source. In these situations, we create an Embedded Data Source.
Creating Embedded Data Source in SSRS
After creating the New Reporting Services project (SSRS project), the Report Data looks like the below.
To create an Embedded one in SSRS, Right-click on the Data Sources folder present in the Report data and select the Add Data Source option from the context menu.
Once you click on that option, it will open the Data Source Properties window to configure the SSRS Data Source. Following are the properties inside the SSRS Embedded Data Source Properties window.
- Name: Please specify a valid unique name for the data source you want to create.
- Type: Please select the connection type from the drop-down list. The Data Source supports multiple connection types. For instance, if your data source is SQL Server, select Microsoft SQL Server; otherwise, OLE DB. If your data source is Analysis Service, then select Analysis Services.
- Connection Strings: If you know how to write the connection string, write it down here. If not, click the Edit button to specify the Data Source (Provider), Server Instance Name, Login credentials, and Database Name.
TIP: If you want to use the already created Shared data source, then please select the Use Shared data source reference radio button and select the existing shared data source from the drop-down list.
Click on the Edit button from the above screenshot will open another window to configure the Connection Properties. Here we have to specify the Data Source (Provider), Server Name (or Instance Name), Login credentials, and Database Name.
In this SSRS Embedded Data Source example,
- Data Source: We are retrieving data from the database. So, we selected the Microsoft SQL Server (SqlClient). You can change this option as per your requirement.
- Server name: Please specify the Server name. For now, we are using our local hostname.
- Log on to the Server: Please specify, How you want to log into the Server. For now, we are using Windows authentication.
From the above screenshot, you can observe that we are using selecting the [AdventureWorksDW2014] database from the list.
Click on the Test Connection button provided below to check whether the connection is successful or not.
Click Ok to finish configuring the SSRS Embedded Data Source connection properties.
- Use Windows Authentication: It will use the current user’s Windows credentials to connect to the data source. For now, We are using this option.
- Use this User name and Password: Please specify the username and password to log into the data source. The report will use this username and password to connect to the data source.
- Prompt for credentials: When the report establishes a connection to a data source, it will prompt the given text (asking for credentials).
- Do not use credentials: The report will not use any credentials to connect with the data source.
Click Ok to finish creating the SSRS Embedded Data Source. Let us see in the Report Data tab.