有没有办法在JasperReports中设置起始页码?
我有一个报告系统,偶尔会有多个连续的JasperReports(例如常规报告和最后的索引报告)。如果常规报告有 21 页长,那么我需要后续报告从第 22 页开始。
有没有一种简单的方法来告诉 JasperReport 从哪个页码开始?我可以用迂回的方式做到这一点,但我觉得我忽略了一些简单的事情。谷歌和必应搜索没有为我提供任何答案。感谢您提供的任何帮助。
I have a reporting system where occasionally there will be multiple JasperReports in a row (e.g. a regular report, and an index report at the end). If the regular report is 21 pages long, then I need the subsequent report to start on page 22.
Is there a simple way to tell a JasperReport what page number to start on? I can do this in a roundabout way, but I feel like I am overlooking something simple. Google and Bing searches have not yielded any answers for me. Thanks for any help you can offer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,没有任何功能可以说“从第 N 页开始”。
但仅仅添加一个参数
$P{FirstPageNumber}
似乎并不算太迂回。然后,在通常使用表达式$V{PAGE_NUMBER}
的字段中,您可以使用$V{PAGE_NUMBER} + $P{FirstPageNumber}
。No, there's no feature to say, "Start on page N."
But it doesn't seem that it would be too roundabout to just add a parameter
$P{FirstPageNumber}
. Then in the field where you would normally use the expression$V{PAGE_NUMBER}
, you would instead use$V{PAGE_NUMBER} + $P{FirstPageNumber}
.使用“页面”+ $V{PAGE_NUMBER}.lowestOneBit( 1 )
use "Page "+ $V{PAGE_NUMBER}.lowestOneBit( 1 )