This tutorial using iReport 4.1.1.
- Open report previously had created (example: rptDDA)
- Click Query Button
- Write this sql:
SELECT P.IDPARENT, P.DVARCHAR PVAR, C.*
FROM SCH.CHILD C
INNER JOIN SCH.PARENT P USING (IDPARENT)
- Click Read Fields button.
- Click OK
- All of Fields will be shown in Report Inspector tab -> Fields node.
- In Inspector Report tab, rightclick the upper node, then select Add Report Group
- In Dialog, set Group Name = grpIDParent, Group by the following report object = IDParent
- Click next button, then Finish.
- Now, we will see two group band, group header and group footer.
- In Inspector Report tab, Fields node, select IDPARENT and PVAR, then drag them to group header band.
- Fit the band height, by double click the bottom line of group header
- Click Preview button.