O'Reilly logo

iReport 3.7 by Shamsuddin Ahammad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using an existing report as a subreport

In the previous example, we created a new master report and a new subreport. We can also use an existing independent report as a subreport. To understand this, let's create another report. Suppose we want a list of purchases (just purchaseNo and purchaseDate) made by a particular supplier. In the master part of the report, the supplier details will be displayed. In the detail part, the list of purchases will be displayed. As we are using an independent report as a subreport, we will produce the list of purchases first, and then this report will be used as a subreport.

Create a report that shows the list of purchases. The following are some report-specific steps:

  • SQL query for the report:
    SELECT * FROM Purchase ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required