【问题标题】:JasperReports: How to remove new page blank in subreportJasperReports:如何删除子报表中的新页面空白
【发布时间】:2012-06-05 17:15:02
【问题描述】:

我创建了一份报告并将子报告放入摘要中。我在子报表中删除新页面空白时遇到问题,因为我在子报表的属性中将点击“运行到底部”。之后,我正确地运行我的报告。数据显示正确,但是当页面后出现一个新页面空白时出现问题。我不知道如何删除空白页。有人知道吗?

【问题讨论】:

  • 您应该张贴生成的报告和 jrxml 文件的屏幕截图

标签: jasper-reports ireport


【解决方案1】:

我知道我的错误不是按尺寸范围放置子报告。尺码带和子报告一定要一样大,这样才不会出现空白页。

【讨论】:

    【解决方案2】:

    我为 reportElement 标签添加属性 isRemoveLineWhenBlank="true" 解决了这个问题:

    <reportElement mode="Opaque" x="0" y="0" width="802" height="60" isRemoveLineWhenBlank="true" ...
    

    并且band高度、reportElement高度和子报表高度必须相等:

    <detail>
            <band height="60" splitType="Stretch">
                <subreport>
                    <reportElement mode="Opaque" x="0" y="0" width="802" height="60" ...
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-18
      • 1970-01-01
      • 2011-04-14
      • 2017-12-27
      相关资源
      最近更新 更多