问题
I think, this should be a feature, when the subreport detail band overflow to the next page, that "...continued" or something should came, but I can't able to solve that issue and I have tried to find out, if there is any solution, but nothing works..
Can any one have a better idea, how to get the solution?
回答1:
The "normal" way to do is:
In subreport put the text in the detail
band (if it is not there already), if text without datasource (just pass a new net.sf.jasperreports.engine.JREmptyDataSource(1)
to the subreport so that detail
band is displayed one.
Having text in
detail
band allows us to use thepageFooter
band, notetitle
band andsummary
band overflows on new page without thepageFooter
. You can also use thesummary
band but then you need to set attributeisSummaryWithPageHeaderAndFooter="true"
onjasperReport
tag.
In subreport add the a pageFooterBand
with your text
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>
This will display the text "...continued" on every subreport page, since we like to avoid it on last page add empty lastPageFooter
<lastPageFooter>
<band height="50"/>
</lastPageFooter>
来源:https://stackoverflow.com/questions/31562288/i-want-continue-text-when-sub-report-will-overflow-to-new-page