iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library iReport Ultimate Guide - Nimsoft Library

13.07.2015 Views

iReport Ultimate GuideFigure 11-7Services viewThe Services view allows you to register new JDBC drivers (by default iReport ships with drivers for MySQL, PostreSQL,and the JDBC-ODBC bridge, but the last is not recommended).The interface to configure a JDBC connection is similar to the one proposed by iReport and is shown in Figure 11-8.Figure 11-8Creation of a database connection using the Services viewWhen the connection has been configured, it will appear in the Services view (Figure 11-9).178

Data Sources and Query ExecutersFigure 11-9The new connection in the Services viewThe last step for using this connection is to create a new iReport connection/data source; it will point to the one justconfigured. Follow the steps indicated to create a new connection/data source and, from the connection type list, selectNetBeans Database JDBC connection, as shown in Figure 11-10, and click Next.Figure 11-10 The NetBeans “bridge” connectionThere are no distinct advantages to using one method or the other to configure a JDBC connection, it’s your choice.11.4 Working with Your JDBC ConnectionWhen the report is created by using a JDBC connection, you specify a SQL query to extract the records to print from thedatabase. This connection can also be used by a subreport or, for example, by a personalized lookup function for the decoding179

<strong>iReport</strong> <strong>Ultimate</strong> <strong>Guide</strong>Figure 11-7Services viewThe Services view allows you to register new JDBC drivers (by default <strong>iReport</strong> ships with drivers for MySQL, PostreSQL,and the JDBC-ODBC bridge, but the last is not recommended).The interface to configure a JDBC connection is similar to the one proposed by <strong>iReport</strong> and is shown in Figure 11-8.Figure 11-8Creation of a database connection using the Services viewWhen the connection has been configured, it will appear in the Services view (Figure 11-9).178

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!