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)
Changing the footerHeight property on runtime
dvilares
Hi there,<br />
<br />
We would like to display the page footer on the last page only.<br />
<br />
We have already applied the solution proposed on this forum which is as follows:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if (BirtComp.lessThan(pageNumber, totalPage))
{
this.getStyle().display = "NONE";
}
</pre>
<br />
This script hides the contents of the footer on any page but the last one, which is great.<br />
However we would also like to reduce the size of the footer to zero for those pages where the footer contents is not visible.<br />
<br />
One of the possible solutions we came up with was something like:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if (BirtComp.lessThan(pageNumber, totalPage))
{
this.getStyle().display = "NONE";
reportContext.getDesignHandle().getMasterPages().get(0).setProperty("footerHeight", 0);
}
</pre>
i.e. getting the reference to the master page and then setting the property "footerHeight" to zero.<br />
<br />
Unfortunately this did not work.<br />
<br />
So any suggestion on how to implement this feature will be very welcome.<br />
We are still using BIRT 2.6.<br />
<br />
Many thanks
Find more posts tagged with
Comments
mwilliams
I think this is going to require you have two separate masterpages. I believe the footer height will have to be changed in the beforeFactory method, which is only called before the report is created. Unfortunately, a single element can only use one masterpage, so switching masterpages for the last page will require some extra work. This is a feature that has been suggested and has been planned, but you might log an enhancement request for it in the eclipse.org/birt bugzilla anyways, to show there is still a need for this feature!