The total band height appears to be miscalculated when some of the elements has isStretchWithOverflow attribute set to true and export format is PDF. The problem is reproducible with the latest official release 2.0.3 using the following code snippet and the report template (inlined)
====
ClassLoader cl = Test.class.getClassLoader();
InputStream instream = cl.getResourceAsStream("jaspertest/template.jrxml");
JasperReport template = JasperCompileManager.compileReport(instream);
Map parameters = new HashMap();
JasperPrint print = JasperFillManager.fillReport(template, parameters,
new JRBeanArrayDataSource(new Object[] {"stuff"}));
FileOutputStream outstream = new FileOutputStream("tmp.pdf");
try {
JasperExportManager.exportReportToPdfStream(print, outstream);
} finally {
outstream.close();
}
====
<?xml version="1.0"?>
/p>
PUBLIC "-//JasperReports//DTD Report Design//EN"
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
pageHeight="842" pageWidth="595" columnWidth="495" columnCount="1"
topMargin="30" bottomMargin="30" leftMargin="50" rightMargin="50">
boolean.TRUE
"blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah"
boolean.TRUE
"blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah"
boolean.TRUE
"blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah"
====
Please let me know if you need any additional input
Recommended Comments