在JasperReports中无法正确呈现PAGE_COUNT ...? [英] PAGE_COUNT not rendered correctly in JasperReports...?

查看:100
本文介绍了在JasperReports中无法正确呈现PAGE_COUNT ...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将页脚 第x页 添加到我的报告中,但PAGE_COUNT似乎无效。

I have added the footer Page x of y to my report, but the PAGE_COUNT doesn't seem to work.

也许问题出现是因为我有很多子报告?

Maybe the problem occurs because I have many subreports?

我得到:

Page 1 of 1

Page 2 of 0

Page 3 of 0

Page 4 of 0

任何想法?

推荐答案

嗯,不知道老版本,但在JasperReports 4.5.1中;您可以定义两个文本字段,包括 $ V {PAGE_NUMBER} 变量。具有评估时间:现在的那个显示当前页码;另一个评估时间:报告显示总页数。一个简单的技巧,但有效:)

Well, don't know elder versions but in JasperReports 4.5.1; you can define two text fields both includes $V{PAGE_NUMBER} variables. The one which has EvaluationTime: now shows current page number; the other one with EvaluationTime: report shows the number of total pages. A simple trick but works :)

这篇关于在JasperReports中无法正确呈现PAGE_COUNT ...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆