In This Topic
This topic discusses about connecting to a data source at design time through the Report Explorer in a or an . You can also connect to a shared data source if you want to use the same data source for many reports.
Checkout data binding while creating a new report using the wizard that guides you through the whole process in the topics that follow.
In ActiveReports Designer, you can setup the data source connection in the Report Data Source dialog. The Report Data Source dialog is where you select the type of data source to use, provide a connection string, and choose other options for your data source. You can also decide to use a shared data source, use a single transaction, and select a method for handling credentials. Once you add a data source, it appears in the Report Explorer under the Data Sources node. You can also add multiple data sources in a single report.
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.
- Microsoft SQL Client Provider
- CSV
- Dataset and Object Providers
- Excel
- JSON Provider
- Microsoft ODBC Provider
- Microsoft OLEDB Provider
- MySQL Provider
- PostgreSQL Provider
- XML Provider
- 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 following, by manually setting up the dependencies and configuration file:
Also, see the Custom Data Provider sample.
You can also create a shared data source if you want to use the same data source in different reports.
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.