Create an Embedded or Shared Data Source (SSRS)
A report data source specifies a name and connection information. Reporting Services supports two types of data sources: embedded and shared. An embedded data source is defined in a report definition and used only by that report. A shared data source is defined as a separate item and can be used by multiple reports. For more information, see Embedded and Shared Data Connections or Data Sources (Report Builder and SSRS).
In Report Builder, you browse to the report server or SharePoint site and select data sources or create embedded data sources. You cannot create shared data sources in Report Builder.
In Report Designer, you can create shared or embedded data sources. From the Report Data pane, begin to create a data source reference, and then select the New option. After you create the data source reference, a new shared data source will automatically be added to Solution Explorer under the Shared Data Sources folder.
Note
You can create and modify report definitions (.rdl) in Report Builder and in Report Designer in SQL Server Data Tools. Each authoring environment provides different ways to create, open, and save reports and related items. For more information, see Designing Reports in Report Designer and Report Builder (SSRS) on the Web at microsoft.com.
You can also create shared data sources directly on a report server or SharePoint site. For more information, see Create, Delete, or Modify a Shared Data Source (Report Manager) or Create and Manage Shared Data Sources (Reporting Services in SharePoint Integrated Mode).
To create an embedded or shared data source
On the toolbar in the Report Data pane, click New and then click Data Source. The Data Source Properties dialog box opens.
Note
If the Report Data pane is not visible, click Report Data on the View menu.
In the Name text box, type a name for the data source or accept the default. The data source name is used internally within the report. For clarity, we recommend that the name of the data source contain the name of the database specified in the connection string.
For an embedded data source, verify that Embedded connection is selected.
From the Type drop-down list, select a data source type; for example, Microsoft SQL Server or OLE DB.
Specify a connection string using one of the following alternatives:
Type the connection string directly in the Connection string text box. For a list of example connection strings, see Data Connections, Data Sources, and Connection Strings in Report Builder or Data Connections, Data Sources, and Connection Strings in Reporting Services.
Click the expression (fx) button to create an expression that evaluates to a connection string. In the Expression dialog box, type the expression in the Expression pane. Click OK.
Click Edit to open the Connection Properties dialog box for the data source type you chose in step 2.
Fill in the fields in the Connection Properties dialog box as appropriate for the data source type. Connection properties include the type of data source, the name of the data source, and the credentials to use. After you specify values in this dialog box, click Test Connection to verify that the data source is available and that the credentials you specified are correct. For more information about specific data source types, see topics in Add Data from External Data Sources (SSRS).
For a shared data source, verify that Use shared data source reference is selected.
Click New. In the Shared Data Source properties dialog box, follow steps 2 and 3 to create a new data source.
Click OK.
The new shared data source appears in the Shared Data Sources folder in Solution Explorer.
Click OK.
The data source appears in the Report Data pane. In the Report Data pane, a shared data source points to the data source definition. In Report Builder, the data source definition is on a report server or SharePoint site. In Report Designer, the data source definition is a file in Solution Explorer under the Shared Data Sources folder.
To import an existing data source in Report Designer
In Solution Explorer, right-click the Shared Data Sources folder in the report server project, and then click Add Existing Item. The Add Existing Item dialog box opens.
Navigate to an existing Report Definition Shared data source (rds) file and then click Open.
Click OK.
To convert an embedded data source to a shared data source in Report Designer
- In the Report Data pane, right-click the data source and then click Convert to Shared Data Source.
To convert a shared data source to an embedded data source in Report Builder
In the Report Data pane, right-click the data source and open Data Source Properties.
Click Embedded Connection and finish creating the embedded data source as described in an earlier procedure.
See Also
Store Credentials in a Reporting Services Data Source
Embedded and Shared Data Connections or Data Sources (Report Builder and SSRS)
Convert a Data Source from Embedded to Shared (Report Builder and SSRS)
Bind a Report or Model to a Shared Data Source (SSRS)
Configure Data Source Properties for a Report (Report Manager)
Data Sources Supported by Reporting Services (SSRS)