A multiple data group is probably available starting with version 3.5.0 of JasperReport.
JasperDesignFactory designFactory = new JasperDesignFactory(); JRBandFactory bandFactory = new JRBandFactory(); JasperDesign design = (JasperDesign) designFactory.createObject(designAttributes); JRDesignSection designSection = (JRDesignSection) design.getDetailSection(); JRDesignBand band1 = (JRDesignBand) bandFactory.createObject(bandAttributes); JRDesignBand band2 = (JRDesignBand) bandFactory.createObject(bandAttributes); JRDesignBand band3 = (JRDesignBand) bandFactory.createObject(bandAttributes); designSection.addBand(band1); designSection.addBand(band2); designSection.addBand(band3);
Moreover, how does this happen.
In XML, you simply create another group, such as the default
In the Designer, which depends on the designer. For example, in iReport (3.7.1):
Go to the "Report Inspector View", right-click the default mouse button, and select "Add another fragment" in the context menu.
Damian Leszczyński - Vash
source share