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)
issue about the page number and total page count
savinyqs
Hi everybody,
I am facing a problem when I use BIRT 2.5. Please find the detail below:
Requirement:
There will be generate serval reports in a PDF file and identify each report by bookmark. In the footer, it need to show a page information like "Page [currentPage]/[totalPageCount]" of each report. For exsample, assume it will generate three reports, the first report have 3 pages, the second one have 4 pages and the third one have 3 pages. Then the footer should show "Page [1\2\3]/3" for the first report, "Page [1\2\3\4]/4" for the second report and "Page [1\2\3]/3" for the third report.\
Issue:
Since I don't know how many pages in a report before it generate, I have no idea how to get the current page and total page count by script. I tried to use the auto-text "PageNumber", but it can only show the page number of whole PDF file not each report. And I tried to access the "pageNumber" variable, but seems that it the pageNumber only updated every time the report has a pagebreak, but each of my report is no pagebreak untill the end. So the result is not correct if I access the "pageNumber" variable.
is there any ideas for how to access the current page number and total page in auto-text? And is there any API to get the current page number like the auto-text?
Please feel free to contact me if any query.
Best Regards,
Savin
Find more posts tagged with
Comments
JRiglar
Hi, a repaginate example and a group page numbering example for you.
regards
J
savinyqs
<blockquote class='ipsBlockquote' data-author="'JRiglar'" data-cid="84379" data-time="1319122076" data-date="20 October 2011 - 07:47 AM"><p>
Hi, a repaginate example and a group page numbering example for you.<br />
<br />
regards<br />
<br />
J<br /></p></blockquote>
<br />
J,<br />
<br />
Thanks for the two sample and your quickly replying. It seems anything error of the group page numbering example. The page number of USA group just show as "page 21 of NaN". Since the page break interval you have set to 40 and it can't contain 40 row in one page, it will auto break into next page. But the next page only have serval row, it will break into next page again. Here is a PDF sample about this issue.<br />
<br />
Moreover, I tried to set the page break interval to 0, but if so, all the page number of USA group are just show "page 21 of NaN".<br />
<br />
do you have any thought for this?<br />
<br />
Best Regards,<br />
Savin