title: Why does sections do not fit the page height?
body: <p>I'm working in a report which needs to be attached to another to generate a bigger report, so it only has title, page footer and summary sections. The problem is that I'm getting a compilation error and I don't know the reason. This is my <code>jrxml</code> file (parts with <code>...</code> omitted for brevity):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jasperReport ... pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="469" leftMargin="70" rightMargin="56" topMargin="130" bottomMargin="56" isSummaryWithPageHeaderAndFooter="true" ...&gt;
      &lt;property ...some properties.../&gt;
      &lt;parameter .../&gt;
      &lt;queryString language="SQL"&gt;...&lt;/queryString&gt;
      &lt;field .../&gt;
      &lt;variable&gt;...&lt;/variable&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;title&gt;
          &lt;band height="650" splitType="Stretch"&gt;...&lt;/band&gt;
      &lt;/title&gt;
      &lt;pageFooter&gt;
          &lt;band height="50"&gt;...&lt;/band&gt;
      &lt;/pageFooter&gt;
      &lt;summary&gt;
          &lt;band height="451"&gt;...&lt;/band&gt;
      &lt;/summary&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>Trying with Jaspersoft Studio I was getting an error but couldn't see the trace, so I made a little routine in Netbeans and the stack trace I'm getting is:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>The line from my code (the last in the stack trace) is this:</p>
  
  <pre><code>String myReport = JasperCompileManager.compileReportToFile("myReport.jrxml");
  </code></pre>
  
  <p>(the file exists and the path is correct)</p>
  
  <p>My first thought was that <code>pageHeight - (topMargin + bottomMargin) &lt; 650px</code> but it turns out that is not the case, in fact is <code>656px</code> so I don't know what I'm missing. Any help or guide is welcomed.</p>
  
  <p>I tried removing <code>&lt;pageFooter&gt;</code> just for test (I can't do it in the final report, it contains some info) and the report compiles and renders smoothly. Besides, I can say that no element is outside the band because it's made with Jaspersoft Studio and that kind of error is shown in the design view.</p>
  
  <p>Any other info about the report source code please let me know in the comments. </p>