Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Page Number reset on group
Baalu
Hi,
I am using BIRT 2.3.2.
Can somebody help me out how to reset the page number in Master page footer on change of group field.
Thank you.
Baalu.
Find more posts tagged with
Comments
mwilliams
I have done this with different sections (i.e. separate tables in a report), but not with groups in a single table. Let me see if I can modify the example I have to work with groups. If not, there is a workaround where you use an interval group and aggregations to make this work.
I'll let ya know.
mwilliams
I got kinda close with groups. I may need to test with the deployed viewer. It doesn't seem that the viewer is running separate run and render in the designer. Variables I set in the onCreate are not recognized in the onRender of the first pages of a group. Only on the last page. So, the logic I'm using doesn't work. I think it would work in a newer version though. Are you bound to using 2.3.2? Let me know. I'll also try this in the deployed viewer to see if it's different than in the designer.
Baalu
Yes Unfortunately..we have to use 2.3.2 only
mwilliams
Nevermind, I found an error in where I was setting one of the PGV's. It works now. Take a look. Run in the web viewer.
Baalu
Thank you so much...It seems to be working in your report in birt viewer but not coming correctly after exporting to pdf from viewer.
For my report, even that is not coming. Im attaching here...Can you pls let me know what was the error done.
mwilliams
The PDF export would work in the newest version as is, I think. There was probably a bug with the PDF export or something in 2.3.2. You might try setting up a java file to run the report with separate run and render tasks. Maybe that will work differently than the export to PDF from the viewer, though it shouldn't, but it might. I'll take a look at your report and let you know if I see what's wrong.
Edit: I ran the report and exported to PDF. The issue is with the page break interval on the table. Natural page breaks in PDF are not taken into account, this is the bug. If you set the page break interval to a number that fits on a page in PDF, like 35, the PDF output is correct when exported from the viewer.
mwilliams
There are a couple issues with your report. The first issue is that you have the script that goes in the onCreate of the group footer in the onPrepare. The second is, you don't have the text element in the masterpage footer with the onRender script. Let me know if you have questions!
laandino
Hi mwilliams,
I am new to BIRT and am trying to accomplish this same thing. I have used your sample report and it is working in all but two cases:
First, some detail about my report:
- I am using BIRT version 2.5.1
- I have an Invoice report with 3 groups:
GH1: Invoice/Customer info
GH2: Service Type (parts, labor, etc)
GH3: Account
Detail: Charges
GF3: Account Subtotal
GF2: EMPTY
GF1: Invoice Total
First case where this is not working properly:
One of my ivoices was able to get everything except for the GF1 on the first page. So on page two, the only info was the Masterpage header, footer, and GF1 (Invoice total). However, the page numbers for both pages were "page 1 of 1". Unfortunately, this is the only invoice that spans multiple pages so I'm not sure if the text would be correct if the page break occured within the detail of the report instead of right before the footer.
Case 2 where this is not working:
On the last page of my report, it shows "Page 77 of NaN" instead of "Page 1 of 1". What could be causing this?
Do you have any ideas on how I can address these two errors?
thanks in advance,
luis