【问题标题】:How to remove the empty space between the bands in JasperReports?如何删除 JasperReports 中波段之间的空白空间?
【发布时间】:2018-07-27 05:56:43
【问题描述】:

我正在 Jasper for Java 中编写一份报告。我将表头放在title band中,将内容放在details band中,将table的摘要部分放在summary band中(这些是所有不同的表)。所有三个表都使用相同的数据集。 Here is the scheme of bands

但是,当我将其打印为 pdf(通过 Java REST 服务)时,表格之间会出现这种差距。 Picture

请告诉我如何删除它?任何想法表示赞赏。

【问题讨论】:

    标签: jasper-reports


    【解决方案1】:

    将行高拉伸到完整的标题栏。

    还可以使用以下代码 sn-p 调整带的高度:

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

    【讨论】: