In This Topic
In a or an , you can connect to a data source at design time through the Report Explorer. You can also connect to a shared data source if you want to use the same data source for many reports. This topic describes the whole concept behind connecting to a data source.
Add a data source
Use the following steps to add a new data source in your report.
- In the designer, go to the Report Explorer-
- Right-click the Data Sources node and select the Add Data Source option.

Or,
- Click the Add button and then select the Data Source option.

- In the Report Data Source dialog that appears, select the General page and enter the name of the data source. By default, the data source name is set to DataSource1. This name appears as a child node to the Data Sources node in the Report Explorer.
- Under Type, select the type of data source you want to use.
- Depending on the data source selected, different options/tabs are displayed to configure the connection.
- For SQL or OleDb data sources, Connection Properties, Connection String, and Advanced Settings tabs appear.
- For XML data source, the Connection Properties and Connection String tabs appear.
- For JSON data source, the Content, Schema and Connection String tabs appear.
- For other data source types, only the Connection String tab appears.
Note: You can create dynamic connection strings by using the runtime variables, such as report parameters.
- Enter the configuration details for the chosen data source type. See Report Data Source dialog properties for more information.
- Click the OK button on the lower right corner to close the dialog. You have successfully connected the report to a data source.
Custom Data Providers
You can also implement some custom data providers such as SQLite, CSV, and Oracle by manually setting up the dependencies and configuration file. See the Custom Data Providers sample for complete implementation and ActiveReports Configuration File topic for information on setting up the configuration file.
Add a shared data source
You can create a shared data source to use the same data source in different reports.
Create a shared data source
The following steps assume that you have already connected your report to a data source.
- Right-click the data source in the Report Explorer and select Share Data Source option.

- In the Save Shared Data Source File dialog that appears, enter the file name and click the Save button to save the file in RDSX format.
Notice that the data source icon changes to show sharing.
Data Source Icon |
Shared Data Source Icon |
 |
 |
Connect to a shared data source
Follow the below steps to add a shared data source in your report.
- In the Report Explorer, click the Add icon on the top left and select Data Source or right-click the Data Sources node and select the Add Data Source option.
- In the Report Data Source dialog that appears, select the General page and enter the name of the data source. This name appears as a child node to the Data Sources node in the Report Explorer.
- Check the Shared Reference checkbox.
- Under Reference, from the drop-down list, select From File.
- In the Shared Data Source File dialog that appears, go to the folder where your shared data source file is located and select it. A file path appears in the field adjacent to the Browse button.
- Click the OK button on the lower right corner to close the dialog. A shared data source node appears in the Report Explorer.
Edit a data source
These steps assume that you have already connected your report to a data source.
- To open the Report Data Source dialog, do one of the following:
- In the Report Explorer, right-click a data source node and in the context menu that appears, select Edit or Edit Shared Data Source option.
- In the Report Explorer toolbar, click the Edit button.

- In the Report Data Source dialog that appears, edit the data connection information.
Report Data Source dialog properties
The Report Data Source dialog provides the following pages where you can set data source properties.