11.02.2013 Views

iReport Ultimate Guide

iReport Ultimate Guide

iReport Ultimate Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>iReport</strong> <strong>Ultimate</strong> <strong>Guide</strong><br />

Resume the testing without closing <strong>iReport</strong> by copying the JDBC driver into the /lib directory and clicking Test again. <strong>iReport</strong><br />

automatically locates the required JAR file and loads the driver from it. In Chapter 11, I will explain the configuration<br />

methods for various data sources in greater detail.<br />

If the test is successful, click the Save button to store the new connection.<br />

The connection will appear in the data source drop-down list in the main tool bar (Figure 2-12). Select it to make it the active<br />

connection.<br />

Another way to set the active connection is by opening the data source window (Figure 2-12):<br />

1. Select the Tools → Report data sources menu item (or by clicking the button on the tool bar next to the data sources dropdown<br />

list).<br />

2. Select the data source that you want to make active.<br />

3. Click Set as default.<br />

The selected data source is the one used to fill the report and perform other operations, such as the acquisition of the fields<br />

selected through SQL queries. There is no strict binding between a report and a data source, so you can run a report with<br />

different data sources, but only one at time. Later, we will see how subreports can be used to create a report that uses multiple<br />

data sources.<br />

24<br />

Figure 2-11 Oracle Driver Loaded from an External JAR<br />

Figure 2-12 Data Sources Window

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

Saved successfully!

Ooh no, something went wrong!