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, editing the configuration file datasource.xml 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 contains the following topics:

For details about configuring runtime connection via API or URL, refer to Changing the Runtime Database Connection and Switching the report database connection.

BackPrevious Page Next PageNext