13.07.2015 Views

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

SHOW MORE
SHOW LESS
  • No tags were found...

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>We are getting all the distinct address information of customers that place orders in the country represented by theCOUNTRY parameter.5. <strong>iReport</strong> should detect the following fields: SHIPNAME and SHIPCITY (Figure 10-8).Figure 10-8The query of the report used as subreport6. Let’s put both fields in the Detail band of the report (Figure 10-9).Figure 10-9Subreport designWe now have to test this report. We need to test it because of the way <strong>iReport</strong> generates the Jasper file that we need whenusing this report as a subreport. When running it, pay attention to what <strong>iReport</strong> displays in the console view (Figure 10-8). Inparticular, pay attention to where the Jasper file has been stored. By default, it should be in the same location in which yousaved the JRXML file. In this example, I used the same directory for master and subreport templates, so it will contain bothmaster.jasper and subreport.jasper.Figure 10-10 Output of the execution of the subreport as a standalone reportDepending on the value of COUNTRY, you can get an empty report or a report showing some items. It does not matter verymuch at this point, just check that you generated the Jasper file.158

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

Saved successfully!

Ooh no, something went wrong!