BackPrevious Page Next PageNext

Working with XML Connections in a Catalog

Setting up XML connections in a catalog

Adding more tables to an XML connection

Managing the tables in an XML connection

This document shows how to set up XML connections in a JReport catalog to get data from XML data sources, and manage the tables that are transformed from the XML data sources in the JReport catalog.

Setting up XML connections in a Catalog

To set up an XML connection to connect a JReport catalog to an XML data source, follow the steps below:

  1. Create a catalog or open a catalog.
  2. In the Catalog Manager, right-click the node of a data source and choose Add XML Connection from the shortcut menu.

    If you want to set up the connection in a new data source in the catalog, select any of the existing catalog data sources, click New Data Source on the Catalog Manager toolbar, then in the New Data source dialog, specify the name of the data source, select the XML connection type and click OK.

    The XML Connection Wizard appears.

    XML Connection Wizard

  3. In the Import XML Schema screen, specify the way to import the XML schemas from the Schema Type drop-down list: Import from XSD or Parse from XML Instance.
  4. Provide the required information for importing the XML schemas.
  5. Click the Time Zone and Locale button to specify the time zone and the locale for the XML instance in the Time Zone and Locale Options dialog.
  6. When parameters and formulas are referenced in the URI/parameter string, click the Edit Format button to edit the format of their values if needed.
  7. Click Next to go to the next screen.
  8. In the Modify Schema Properties screen, supplement and modify the element properties as required and then click Next.

    XML Connection Wizard - Modify Schema Properties

  9. In the Transform XML Schema screen, select an XPath to be the transforming start point. Click Next.

    XML Connection Wizard - Transform XML Schema

  10. In the Transformed Relational Schema screen, check the transformed result, and then click Next.

    XML Connection Wizard - Transformed Relational Schema

  11. In the Add Table screen, add the required tables to the connection, and check the Generate the default pre-join path checkbox for generating default pre-join paths for the tables. A table contains fields mapped to attributes, simple elements, contents of complex elements, and other nodes in the XML data source.

    XML Connection Wizard - Add Table

    Queries and business views can be created based on these tables and a report is developed from a query (or something else which is functionally similar) or from a business view.

  12. Click Finish to confirm the transformed result and finalize the transformation process.

Adding more tables to an XML connection

When an XML connection is set up, you can add more tables transformed from the XML data source into the JReport catalog via the XML connection.

  1. Do one of the following:

    The Add Tables dialog appears.

    Add Tables dialog

  2. Click the Refresh button. The tables contained in the schema that is transformed from the XML file will then be displayed in the Tables box.
  3. Choose the required tables in the Tables box, and then click Add.

    To choose consecutive tables, click the first table, press and hold down the SHIFT key, and then click the last table. To choose tables that are not consecutive, press and hold down CTRL, and then click each table.

  4. After adding the required tables, click Done to close the dialog.

Managing the tables in an XML connection

For the tables that have been transformed from an XML data source and added into a JReport catalog via the specified XML connection, you can refresh them, organize them into folders, and remove and add the table columns the same as you do on tables from a JDBC database.

BackPrevious Page Next PageNext