贾斯珀·佩奇(Jasper Page)在新字段/变量上中断 [英] Jasper Page break on New Field/Variable
问题描述
我正在处理一个碧玉报表,并且试图找出一种在可变更改时报表分页的方法.该变量实际上是一个字段,我将字段的值放在一个变量中.
I am working on a jasper report, and I am trying to figure out a way for the report to page break on a variable change. The variable is actually a Field, and I put the value of the field in a variable.
现在,贾斯珀报告(Jasper Reports)网站上有一个示例,说明了如何按这种方式将其破坏
Now, the Jasper Reports website has an example on how to break it by count like this
<groupExpression><![CDATA[new Boolean($V{BreakGroup_COUNT}.intValue()
> 5)]] ></groupExpression>
但是,我不确定以任何方式比较上一个或下一个值并在此之后中断.
However, I am not sure of any way to compare the previous or next value and breaking after that.
推荐答案
您只希望报表在$ F {MyField}更改值时开始一个新页面.
You just want the report to start a new page when $F{MyField} changes value.
在这种情况下,只需使用"Group Expression"创建一个组:$F{MyField}
In this case simply create a group with 'Group Expression': $F{MyField}
为该组打勾开始新页面"选项.不需要变量.
Tick the option 'Start on a new page' for the group. There is no need for a variable.
这篇关于贾斯珀·佩奇(Jasper Page)在新字段/变量上中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!