Backgroud: Use Java + BIRT to generate report. Generate report in viewer and allow user to choose to export it to different format (pdf, xls, word...).
All program are in "Layout", no program in "Master Page". Have 1 "Data Set". The fields in "Layout" refer to this DS. There is Group in "Layout", gropu by one field. In "Group Header", I create one cell to use as page number. "Page : MyPageNumber". "MyPageNumber" is a field I define which would +1 in Group Header.
Problem: When I use 1st method to generate report, "MyPageNumber" could not show correctly. Because group header only load one time for each group. It would always show 1.
Question: As I know there is "restart page number in group" in Crystal report. How to restart page in BIRT? I want to show data of different group in 1 report file, and the page number start from 1 for each group.
Alas, this is not supported with BIRT.
That's probably not the answer you've hoped for, but it's the truth. This is one of the very few aspects where BIRT is way behind other report generator tools.
However, depending on how you have BIRT integrated into your environment, a workaround approach is possible for PDF export that we use in our solution with great success. The idea is to let BIRT generate a PDF outline based on the grouping. And the BIRT report creates information in the ReportContext about where and how it wants the page numbers to be displayed. After BIRT generated the PDF, a custom PDFPostProcessor uses the PDF outline and the information from the ReportContext to add the page numbers with iText. If this work-around is viable for you, feel free to contact me.