Search code examples
jasper-reports

How to remove the empty space between the bands in JasperReports?


I'm working on a report in Jasper for Java. I put the table header in the title band, the content in the details band and the summary part of table in the summary band (these are all different tables). The same Dataset is used in all three tables. Here is the scheme of bands

However, when I print it to pdf (via Java REST service) this gap appears between tables. Picture

Tell me please how to remove it? Any ideas appreciated.


Solution

  • Stretch the row height to full title band.

    Also adjust the height of the band using below code snippet:

     <band height="<your_couple_of_lines_of_text_height>">
     <printWhenExpression><![CDATA[$V{PAGE_NUMBER} < 2]]></printWhenExpression>
     the_conditional_header_content_here
     </band>