Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How to retrieve current page number inside table group
i5analyst
Here's what I'm trying to do:
I've created a report with a table that groups & breaks on one column(InterceptCart) and outputs to pdf. I want to print the current page number in the Group Header and in the Detail Lines. I have an event handler class attached to the detail row that will retrieve, and save to a file, the detail row column values plus 2 variables I created to store the page number(InterceptPage) and detail print line number(InterceptLine).
Here's my problem:
I've tried using the variable pageNumber in various ways to populate InterceptPage with the same page number value that prints from the master page without success. It appears that I'm getting a group time page number that doesn't take into account when a group spans more than one page.
Example: The first group to print spans 2 pages.
Page 1 - Master Page prints 1 - Group Header&Detail prints 1
Page 2 - Master Page prints 2 - Group Header&Detail prints 1
Page 3 - Master Page prints 3 - Group Header&Detail prints 2
Any assistance would be greatly appreciated.
Thanks!
Find more posts tagged with
Comments
mwilliams
Hi i5analyst,
You could try creating your own variable and incrementing it on the pageBreak event. I don't see how the detail rows are having a problem with the pageNumber variable though. Haven't seen that before. Can you recreate this issue with the sample database, so I can see it? Thanks. What version of BIRT are you using?
i5analyst
I'm using Eclipse BIRT Designer Version 2.5.0.v20090603. I will try it on the sample database and submit my findings as time permits this weekend.
I had tried incrementing InterceptPage on the pagebreak event for the table, and also tried "vars["InterceptPage"] = pageNumber;" on the render event for the detail rows without success.
It seems to me like I should be able to use the "pageNumber" field in BIRT to retrieve the pagenumber value at any time?
Can you give me some more details regarding "...incrementing it on the pageBreak event..."? This is my first report and I don't totally understand BIRT's events and phases.
mwilliams
i5analyst,
If you get a sample report made with the sample database that I can run, I'll be able to see exactly what you're doing and what problems you're having. This will help greatly.