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 do I use variable pageNumber ?
leonelag
Hello all,
My report shows the page number at the bottom, using a master page. I have a requirement where in even pages, the page number is shown on the left and in odd pages, the page number is shown on the right.
I'm trying to do this with two autotexts on the master page, on the left and right, and using the visibility property to hide the left number when "pageNumber % 2 == 0" and hide the right number when "pageNumber % 2 != 0".
The problem is, variable pageNumber is always 1 on the report.
You can see it in the attached report, there is a text box with the contents
<value-of>pageNumber</value-of>, it always shows 1.
- Why is variable pageNumber always 1 ?
- Is there a more usual way to accomplish this even/odd page requirement ?
Using Birt 2.5.0
Thanks.
Leonel
Find more posts tagged with
Comments
mwilliams
Hi Leonel,<br />
<br />
Unfortunately because of the way that the master page is rendered, pageNumber will always be 1 if used there. This could be something to request as an enhancement at <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/reportabug.php'>BIRT
: Reporting Bugs and Requesting Enhancements</a>.<br />
<br />
I'm not sure if there's going to be a good solution to this problem. If you only have a table in your report, you could possibly use a group on your table based on an interval that will fit the page and alternate the visibility of the pageNumber position in the group footer.
TMass
I'm having issues with page numbers as well... fortunately, i'm not required to alternate pages. ALTHOUGH, I do have to have a new page number show up on every page. Right now it's just showing "1" on each page. I'm getting by this conversation that it is not done in the "Master Page"... can someone help me out with this?
Thanks
Trav
mwilliams
Hi Trav,
Can you describe your issue a little further. Are you using the pageNumber variable or the auto-text items in the master page?
icirillo
<p>This is a workaround for the original problem.</p>