How to manually insert page break in JasperReports on basis of certain conditions

允我心安 提交于 2021-02-07 21:11:41

问题


I want to check if else condition in subreports for page break like.

I am printing customername in pdf report using jasper template, i need to break the page if the customer name is different and the new customer name should be printed in new page. How to do that?


回答1:


A couple of different possibilities:

Page Break

  1. Add a Page Break
  2. Change its PrintWhenExpression

Report Group

  1. Right-click on the report name (in the Report Inspector)
  2. Select Add Report Group
  3. Provide a Group Name (e.g., UniqueCustomer)
  4. Set the Group by value to the customername field
  5. Click Finish


来源:https://stackoverflow.com/questions/3659326/how-to-manually-insert-page-break-in-jasperreports-on-basis-of-certain-condition

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