Using the DataSource Icon
ActiveReports makes it easy to bind your report to a data source by using the yellow DataSource icon located in the Detail section of the report design surface or by accessing the DataSource dialog from the Report Settings menu.

To use the DataSource icon
- Open a Visual Studio project.
- Add an ActiveReport to your project.
- Once the report is added, you will see the report design surface.
- Click on the yellow DataSource icon in the Detail section of the report.
- You will then be prompted to select your data source, connection string and query.
To connect to Microsoft Access using Jet 4.0
- Click on the yellow report DataSource icon in the Detail section.
- This brings up the report DataSource dialog box.
- Click on Build...
- Select "Microsoft Jet 4.0 OLE DB Provider" and click Next >>.
- Enter a database name or click on the ellipsis to browse for the access path to a database.
- Click Open once you have entered a database name or selected the appropriate access path.
- Click OK to continue.
- Enter a SQL statement in the Query box (e.g. "Select * from products").
- Click OK to return to the report design surface.
To connect to SQL Server
- Click on the yellow report DataSource icon in the Detail section.
- This brings up the report DataSource dialog box.
- Click on the Data Source drop-down arrow and select SqlClient.
- Click on Build...
- Select "Microsoft OLE DB Provider for SQL Server" and click Next >>.
- Select a server.
- Chose Windows integrated security or a specific username and password.
- Choose the database for connection and click OK.
- Enter a SQL statement in the Query box (e.g. "Select * from products").
- Click OK to return to the report design surface.
To connect to an XML database
- Click on the yellow report DataSource icon in the Detail section.
- This brings up the report DataSource dialog box.
- Click on the Data Source drop-down arrow and select XML.
- Click on the ellipsis beside File URL to browse for the access path to Customer.xml.
- Click Open once you have selected the appropriate access path.
- In the Recordset Pattern field, enter a pattern (e.g. "//ITEM").
- Click OK to return to the report design surface.
Note In the report data source dialog, there is a <NONE> option for the data source drop-down. If this option is chosen, it will clear out the data source code in the auto-generated code section. This option would be used if you had set a data source for the report previously and you no longer want one.
Getting Started | Report Structure | Report Execution | Report and Page Settings
Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.