如果记录溢出最后一个,如何将记录放入 JasperReports 的新页面?
How do I place a record into a new page in JasperReports if it overflows the last one?
我正在使用 Jaspersoft Studio 6.2.0 和 JasperReports 6.2.0 库。
我有一份报告,在详细信息部分,table 中的某些记录可能会溢出一个页面,而其其余内容将写入一个新页面。引擎有没有可能意识到内容溢出了页面,将整条记录作为下一页的第一条打印出来?
报告的生成方式如下:
我需要的是最后一条记录打印在下一页而不是上一页。是否可以使用 JasperReports 实现此结果?
通常可以通过在 JRBand
上使用 splitType="Prevent"
来避免这种情况
Prevent The band starts to render normally, but if the bottom of the
page is reached without finishing the band, the whole contents of the
band that are already being laid out are moved to the next page. If
the band does not fit on the next page, the split occurs normally, as
band split prevention is effective only on the first split attempt
例子
<detail>
<band height="20" splitType="Prevent">
... your text fields ..
</band>
</detail>
我正在使用 Jaspersoft Studio 6.2.0 和 JasperReports 6.2.0 库。
我有一份报告,在详细信息部分,table 中的某些记录可能会溢出一个页面,而其其余内容将写入一个新页面。引擎有没有可能意识到内容溢出了页面,将整条记录作为下一页的第一条打印出来?
报告的生成方式如下:
我需要的是最后一条记录打印在下一页而不是上一页。是否可以使用 JasperReports 实现此结果?
通常可以通过在 JRBand
上使用splitType="Prevent"
来避免这种情况
Prevent The band starts to render normally, but if the bottom of the page is reached without finishing the band, the whole contents of the band that are already being laid out are moved to the next page. If the band does not fit on the next page, the split occurs normally, as band split prevention is effective only on the first split attempt
例子
<detail>
<band height="20" splitType="Prevent">
... your text fields ..
</band>
</detail>