BackPrevious Page Next PageNext

Setting Up a JDBC Connection

This procedure assumes you have set up the JDBC driver as described in the previous topic.

To connect a JReport catalog with a relational database via a JDBC driver:

  1. Create a catalog or open a catalog.
  2. In the Catalog Manager, right-click the node of a data source and select New JDBC Connection from the shortcut menu. Click JDBC in the Select Connection Type dialog.

    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 JDBC connection type and click OK.

  3. In the Get JDBC Connection Information dialog, provide the necessary information to connect with the database. If your database has some special requirements, you can click the More Options button to modify the options according to your requirements. Click Test Connection to test whether the JDBC information you provide is available.

    Get JDBC Connection Information dialog

  4. Click OK to set up the connection, and you will be prompted with a message box showing the status of connecting to the JDBC driver.

    Upon the finishing setting up the connection, the Add Tables dialog is displayed, prompting you to add tables from the database to the connection. If you want to add tables at a later date, click Done.

You have four ways to set up a JDBC connection:

Via specific JDBC drivers, you can set up connections which connect JReport Designer to different report databases. The following are some examples.

Example 1: Via the Oracle JDBC Driver

Example 2: Via the MySQL JDBC Driver

Example 3: Via SQL Server

Example 4: Via DB2

Example 5: Via Informix

Example 6: Via PostgreSQL

Example 7: Via WebLogic 6.1 Connection Pool

Example 8: Via Vertica

Example 9: Via Amazon RDS

Example 10: Via RedShift

BackPrevious Page Next PageNext