This procedure assumes you have set up the JDBC driver as described in the previous task.
Note: The URL format is regulated by the driver itself. That is, different drivers have different URL formats. The format of the driver template in JReport.bat is jdbc.drivers=JDBCDriverName:JDBCDriverName:...
where, JDBCDriverName is the JDBC driver name that can be auto-loaded when JReport starts up and ":" is the delimiter between two driver names. JReport will search from the first and find one that can work with the driver, URL, and user name and password in the catalog.
Below is an example of the jdbcdrivers.properties file which specifies an Oracle thin driver and an Interbase thin driver:
jdbc.drivers=oracle.jdbc.driver.OracleDriver:interbase.interclient.Driver
To set up a JDBC connection:
If you want to set up the connection by adding a data source to an existing catalog and then defining the connection on the data source, open the catalog, select any data source contained in it, click the New Data Source button
on the Catalog Browser toolbar, then in the New Data source dialog, specify the name of the data source, select the JDBC connection type and click OK.
You have four ways to set up a JDBC connection:
Note: After entering the JDBC URL, user name and password, you can leave the JDBC Driver field empty and instead supply it in a property file - jdbcdrivers.properties.
Notes:
The following examples show how to set up connections via specific JDBC drivers: