【问题标题】:I want "continue..." text when sub report will overflow to new page当子报告溢出到新页面时,我想要“继续...”文本
【发布时间】:2016-07-03 06:07:59
【问题描述】:

我认为,这应该是一个功能,当子报表详细信息带溢出到下一页时,应该出现“...继续”或其他内容,但我无法解决该问题,我已尝试找出,如果有任何解决方案,但没有任何工作..

谁能有更好的主意,如何获得解决方案?

【问题讨论】:

  • 到目前为止你尝试过什么?

标签: jasper-reports


【解决方案1】:

“正常”的做法是:

subreport 中将文本放入 detail 带区(如果它不存在),如果文本没有数据源(只需将 new net.sf.jasperreports.engine.JREmptyDataSource(1) 传递给子报表,以便 detail 带区显示一个。

detail 波段中包含文本允许我们使用pageFooter 波段,请注意 title 乐队和 summary 乐队在新页面上溢出,没有 pageFooter。您也可以使用summary 带,但您需要在jasperReport 标签上设置属性isSummaryWithPageHeaderAndFooter="true"

subreport 中添加 pageFooterBand 和您的文本

es.

<pageFooter>
    <band height="50">
        <staticText>
            <reportElement x="446" y="18" width="100" height="20" uuid="efa2e741-c546-4261-bdb7-a4b211212f17"/>
            <text><![CDATA[...continued]]></text>
        </staticText>
    </band>
</pageFooter>

这将在每个子报表页面上显示文本“...继续”,因为我们希望避免在最后一页添加空 lastPageFooter

<lastPageFooter>
    <band height="50"/>
</lastPageFooter>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-28
    • 2019-05-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多