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 Numbering
rmendonsa
I have a document with 5 pages, but, I want to start the page numbers only from the third page and it should read page 1 of 5 starting on the third page. Is there a way to do it in BIRT? If I use the AutoText "Page n of m" on the third page it dispalys page 3 of 5 instead of the way I want it....page 1 of 5.
Thanks.
Find more posts tagged with
Comments
Tubal
Make an empty label somewhere in the masterpage.
Then in the onRender script of that label:
if(pageNumber < 3){this.text = ""} else {this.text = (pageNumber - 2) + " of " + (totalPage - 2)}
Note: This won't work in a PDF document. I haven't found a way to use the totalPage variable with PDF documents.
But you could use:
if(pageNumber <= 2){this.text = ""} else {this.text = pageNumber - 2}
And just not show the total pages.
Thanks,
Phil
rmendonsa
Thanks Phil! Your solution worked.