BackPrevious Page Next PageNext

Configuring Connections

Normally, after a report has been created, it is fixed to a specific catalog connection. JReport allows you to change the connection by applying a dynamic connection, configuring the datasource.xml file to connect to another JDBC or JNDI data source, or by setting a runtime connection via the Server API/URL.

The connection priority is as follows:

Runtime configuration of connection > dynamic connection > datasource.xml > catalog connection

This means that if the approach with higher priority fails to get the connection, the one with the next lower priority will be used.

Assuming that the catalog has two databases named as data source 1 and data source 2, here are some examples:

This section introduces Configuring Dynamic Connections and Configuring the datasource.xml File respectively.

For details about configuring runtime connection via API or URL, refer to the following topics:

BackPrevious Page Next PageNext