1

I'm doing a project to facilitate the creation of reports with DynamicJasper and I got to a part where I have to position an element that is in the Band PageHeader manually, set the position X and Y, and this is done after the generation of the report by DynamicJasper, the problem is that after I position the element the height of the Band PageHeader remains the same even with the element in another position and there is an empty space between the Band PageHeader and the other Bands below. So I was wondering if it is possible to set the height of the Band PageHeader dynamically so that this space is not left empty?

Final code where I build the DynamicJasper report and where I want to do this:

final DynamicReport dynamicReport = this.fastReportBuilder.build();
dynamicReport.setAllowDetailSplit(true);

final JasperReport jasperReport = DynamicJasperHelper.generateJasperReport(dynamicReport, new ClassicLayoutManager(), null);

((JRDesignBand) jasperReport.getPageHeader()).setHeight(200); // <- Does not work :S

final JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, null, new JRBeanCollectionDataSource(dados));

this.templateBuilder.setPageObjectsPosition(jasperPrint);
//... more code ...//

Edit1: my english is very primitive, sorry for any wrong translation :v

Alex K
  • 22,315
  • 19
  • 108
  • 236
Bruno
  • 11
  • 2

0 Answers0