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 n/m right align in MasterPage
Joram
Hi all,<br />
<br />
I'm having this issue and regardless of its high hit quote in google I didn't found a satisfying solution (Output format is PDF).<br />
<br />
Using Birt 3.7.1 I want (preferable in the master page) to show "currentPage / totalPages". This would be no problem but as soon as I right align the elements it gets messy.<br />
<br />
This is how the header in the master page should look like (a single grid with 2 rows / 3 cols):<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
|text | text|
|text | |
|text | n/m|
</pre>
<br />
The width of 'm' is variable since total pages can have a different amount of digits in the reports.<br />
My first try was using the 3 elements needed (AutoText 'PageNumber', Label '/' and AutoText 'Total Page') in a single cell, right aligning the elements and setting display to inline (with css styles since cannot choose the display type on AutoTexts).<br />
<br />
This makes it look like:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
|text | text|
|text | |
|text | n/ m|
</pre>
<br />
Putting another grid in the bottom right cell and each element in its own cell doesn't solve the problem either because I couldn't figure out how to set the column width to use 'the minimal width required'.<br />
<br />
Any suggestions / or links to solutions are highly appreciated. I would think of this is kinda a common problem...<br />
<br />
best regards,<br />
Joram
Find more posts tagged with
Comments
mwilliams
You could put this in the onRender script of a dynamic textbox in your masterpage grid:
this.text = pageNumber.toString() + " / " + totalPage.toString();
Just be sure you're running your report with the frameset option, if by URL or with separate run and render tasks if using java or the command line. This will always show the page number with the right amount of spacing.