Glossary Item Box

Getting Started | Report Structure | Report Execution | Report and Page Settings

See Also ActiveReports for .NET 2 Online Help Send feedback to Data Dynamics

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

  1. Open a Visual Studio project.
  2. Add an ActiveReport to your project.
  3. Once the report is added, you will see the report design surface.
  4. Click on the yellow DataSource icon in the Detail section of the report.
  5. You will then be prompted to select your data source, connection string and query.

To connect to Microsoft Access using Jet 4.0

  1. Click on the yellow report DataSource icon in the Detail section.
  2. This brings up the report DataSource dialog box.
  3. Click on Build...
  4. Select "Microsoft Jet 4.0 OLE DB Provider" and click Next >>.
  5. Enter a database name or click on the ellipsis to browse for the access path to a database.
  6. Click Open once you have entered a database name or selected the appropriate access path.
  7. Click OK to continue.
  8. Enter a SQL statement in the Query box (e.g. "Select * from products").
  9. Click OK to return to the report design surface.

To connect to SQL Server

  1. Click on the yellow report DataSource icon in the Detail section.
  2. This brings up the report DataSource dialog box.
  3. Click on the Data Source drop-down arrow and select SqlClient.
  4. Click on Build...
  5. Select "Microsoft OLE DB Provider for SQL Server" and click Next >>.
  6. Select a server.
  7. Chose Windows integrated security or a specific username and password.
  8. Choose the database for connection and click OK.
  9. Enter a SQL statement in the Query box (e.g. "Select * from products").
  10. Click OK to return to the report design surface.

To connect to an XML database

  1. Click on the yellow report DataSource icon in the Detail section.
  2. This brings up the report DataSource dialog box.
  3. Click on the Data Source drop-down arrow and select XML.
  4. Click on the ellipsis beside File URL to browse for the access path to Customer.xml.
  5. Click Open once you have selected the appropriate access path.
  6. In the Recordset Pattern field, enter a pattern (e.g. "//ITEM").
  7. 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.