Resetting page numbering with the start of a particular record

You may need to reset the page numbering of your report at certain places. For example, if you are generating a weekly or monthly report of all customer invoices, you may want to reset page numbering in your report with the start of every customer. This is sometimes convenient, as it allows you to generate just one report (that is, a report of all invoices issued in a month), which actually consists of many reports (that is, a report for each of your customers).

JasperReports offers an interesting feature known as grouping of records, which you can use to do many tricks in report designing. This recipe demonstrates how to use the grouping feature to reset page numbering in your report. ...

Get JasperReports 3.6 Development Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.