I am working on a report that needs to be connected to another in order to create a larger report, so it only has a title, page footer and summary sections. The problem is that I get a compilation error, and I don't know the reason. This is my file jrxml(parts with ...omitted for brevity):
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport ... pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="469" leftMargin="70" rightMargin="56" topMargin="130" bottomMargin="56" isSummaryWithPageHeaderAndFooter="true" ...>
<property ...some properties.../>
<parameter .../>
<queryString language="SQL">...</queryString>
<field .../>
<variable>...</variable>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="650" splitType="Stretch">...</band>
</title>
<pageFooter>
<band height="50">...</band>
</pageFooter>
<summary>
<band height="451">...</band>
</summary>
</jasperReport>
Trying with Jaspersoft Studio I got an error but could not see the trace, so I did a little procedure in Netbeans, and the stack trace I get is:
Exception in thread "main" net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :
1. The title section, the page and column headers and footers and the margins do not fit the page height.
at net.sf.jasperreports.engine.design.JRAbstractCompiler.verifyDesign(JRAbstractCompiler.java:280)
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:152)
at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:357)
at net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:273)
at net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:232)
at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:542)
at ar.edu.unt.jasper.ReportCompilerAndExporter.main(ReportCompilerAndExporter.java:25)
The line from my code (the last in the stack trace) is this:
String myReport = JasperCompileManager.compileReportToFile("myReport.jrxml");
(the file exists and the path is correct)
, pageHeight - (topMargin + bottomMargin) < 650px, , , 656px, , . .
<pageFooter> ( , ), . , , , Jaspersoft Studio, .
, , .