Jasper Page break on New Field/Variable

谁说胖子不能爱 提交于 2021-02-16 20:09:10

问题


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.

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.


回答1:


You just want the report to start a new page when $F{MyField} changes value.

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.




回答2:


Select the header of the group in the Document Structure window, and then select in the Properties window Start on New Page.



来源:https://stackoverflow.com/questions/12061936/jasper-page-break-on-new-field-variable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!