Manu
Manu

Reputation: 3247

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

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?

Upvotes: 3

Views: 13151

Answers (1)

Dave Jarvis
Dave Jarvis

Reputation: 31171

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

Upvotes: 4

Related Questions