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)
Page numbers not incrementing
gslane
I'm using the following expression in the master page footer to display the page number in a "page x of y" format. No matter how many pages the report generates, every page has "Page 1 or 1".
Here's the expression... "Page " + pageNumber + " of " + totalPage.
What am I doing wrong?
Thanks,
Steve
Find more posts tagged with
Comments
alex520
do you use the autotext element in masterpage , not text element with <value-of>. you can find it in masterpage ui palette
gslane
hi alex.....
I'm using dynamic text, not autotext. autotext seems to work properly as far as the page numbers go, but I'm not sure how to format it so it's centered nicely on the page. it creates a 3-column grid in the footer.
and I'd like it to be in the format "Page x of y", instead of the plain "x / y" format of the autotext.
thanks,
steve
gslane
any ideas out there? anybody run into this issue before?
thanks.
mwilliams
Hi Steve,
So, this issue happens when you attempt to create your own page n of m setup in the masterpage footer? What version of BIRT are you using?
Jarry
Hi gslane,
you can do it with autotext, because you can edit the predef format like I do in the image I show you. I add a new Column at the left of the grid with a Label "Page", and the cell that contains "/" is modified with double click.
Regards!
gslane
Mike.... that's correct. I'm using version 2.3.1.
Jarry.... thanks for the suggestion. I actually tried it that way, but I want the info to be centered nicely on the bottom of the page.
Thanks.
Jarry
You can center it as I show you in the next image.
First, add a grid with 7 columns for example (try another number), and then, add the autotext into the fourth cell.
Problably there is a better way, but I started with BIRT one week ago
mwilliams
Jarry- No, you are correct. The best way to center it will be with a grid (7 cells or 3, it doesn't matter).
Steve- You can add the auto text to the center cell of the outer grid, add another grid cell to the left on the auto text grid, put the word "page" in there and change the '/' to 'of'. Then, you can assign widths to all the inner and outer grid cells to make it look how you want it.
gslane
Thanks guys..... that works.
Mike - any idea why the variables aren't incrementing correctly? Seems like that would be the better solution if it worked.
mwilliams
Steve,<br />
<br />
The reason it says 1 of 1 that way is because the master page is only rendered once and then repeated over every page of the report. The auto text values are handled slightly differently so that they update with the correct current info. If you were to put the 'pageNumber' variable into a dynamic text box in your report, it would say the correct value all through the report because it's being re-rendered each time, unlike the master page. You could search the bugs/enhancement requests at <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/reportabug.php'>BIRT
: Reporting Bugs and Requesting Enhancements</a> and see if anything has been reported on this. I'm sure there has been, but I don't know that anything will change unless the master page is re-rendered for each page. Hope this explanation helps.
gslane
Mike.....
Thanks for the clarification.... I'll check out the bugs/enhancements for any related requests.
Steve
adamzg
I think this is the enhancement request mwilliams is referring to...<br />
<a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=235520'>https://bugs.eclipse.org/bugs/show_bug.cgi?id=235520</a>
;