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
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:
SELECT * FROM Purchase ...