Creating the Data Source

To access data for a BIRT report, you must use a BIRT data source. A BIRT data source is an object that contains connection parameters.

Tip: Before creating a data source or multiple sources for your first reports, consider the issues of project and resource organization. If you plan to reuse a data source in multiple report projects, you can create that data source in a library and reuse that data source from the library. The advantage of this approach is that updates to the BIRT data source in the library are subsequently available to all reports that use the library.

Use the Data Explorer, as described in this section, to create and manage BIRT data sources. BIRT Report Designer supports using multiple data sources for the report design. The data sources can be of different types. For example, you can use data from an RDBMS database and data from a flat file repository in the same report design. In this example, the data is extracted from the sample XML data source file.

Procedure

  1. In the Data Explorer view, right-click Data Sources and select New Data Source.
  2. Select XML Data Source, enter a name for the data source, and click Next.
  3. Select the sample data source file (obtained in Obtaining a Data Source):
    1. Click Browse (to the right of the upper text entry field).
    2. In the Open dialog, change the Files of type filter from *.xml to *.*.
    3. Select the sample data source file (obtained in Obtaining a Data Source), and click Finish.
  4. In the Data Explorer view, double-click the newly created data source in the and select Property Binding.

    In the XML Data Source File field, enter params["sourcexml"] and click OK.

    Note: The parameter (params["sourcexml"]) is passed to the report at runtime.