ActiveReports Developer 7
Connect to a Data Source
See Also Support Forum
ActiveReports Developer 7 > ActiveReports Developer Guide > How To > Page Report How To > Work with Data > Connect to a Data Source

Glossary Item Box

In a page report, you can connect to a data source at design time through the Report Explorer. Use the following instructions to connect to various data providers supported in ActiveReports.

These steps assume that you have already added a Page Layout template in a Visual Studio project. See Adding an ActiveReport to a Project further information.

  1. In the Report Explorer, right-click the Data Sources node and select the Add Data Source option or select Data Source from the add button.
  2. 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 Data Source1. This name appears as a child node to the Data Sources node in the Report Explorer.
  3. Under Type, select the type of data source you want to use.
  4. Under Connection, enter a Connection String. If you select SQL, OleDB, or Oracle as the data source Type value, Connection Properties, Connection String and Advanced Settings pages appear under Connection. See Report Data Source Dialogfor further details.

    Note: When you select an XML Provider under Type, the connection string must include XmlDoc or XmlData. Use of TransformationDoc is optional. See details of each of these connection string types below:

    ShowConnection String

    • XmlDoc: Refers to a specific XML file located on either the file system or at a web-accessible location. For example, XmlDoc=C:\MyXmlFile.xml;
    • XmlData: Provides specific XML data in the Connection String itself. For example,
      XmlData=<people>
        <person>
          <name>
            <given>John</given>
            <family>Doe</family>
          </name>
        </person>
        <person>
          <name>
            <given>Jane</given>
            <family>Smith</family>
          </name>
        </person>
      </people>;
    • TransformationDoc: Refers to a specific XSLT file to apply to the XML data.

    Note that elements in the Connection String must be terminated with a semicolon (;) character.

  5. Click the Validate Data Source icon to confirm the connection string. This icon becomes inactive to indicate success, while an error message indicates an invalid connection string.
  6. On the Credentials page, you can specify password, credentials, or Windows authentication.
  7. Click the OK button on the lower right corner to close the dialog. You have successfully connected the report to a data source.

In ActiveReports, you can connect to most data sources with these steps. However, you need to follow the instructions below to connect to a Shared Data Source.

ShowConnect to a Shared Data Source

  1. In the Report Explorer, right-click the Data Sources node and select the Add Data Source option or select Data Source from the Add button. 
  2. 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.
  3. Check the Shared Reference checkbox on.
  4. Under Reference, click the Browse button and from 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.
  5. Click the OK button on the lower right corner to close the dialog. A shared data source node appears in the Report Explorer.

See Also

©2014. ComponentOne, a division of GrapeCity. All rights reserved.