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)
Display Master Page Footer only on Last Page
vensw
Hi All,<br />
<br />
I'm new to BIRT and I need to find a way to <span style='color: #FF0000'>display the Master Page footer only on the Last page</span>. I'm actually using XML file as Data source and displaying the data in the pdf format. I came across one similar thread with the topic title as "<span style='color: #9ACD32'>Show footer only last Page PDF problem</span>" by <span style='color: #FF8C00'>Rachata</span>. I have copy-pasted the below script to achieve the result but could not succeed. All I did was to select the footer and go to script tab, and in the Script drop down I have selected onRender and pasted the script and saved the report.<br />
<br />
if (BirtComp.lessThan(pageNumber, totalPage))<br />
{<br />
this.getStyle().display = "NONE";<br />
}<br />
<br />
Could you guys please help me out in getting the solution. Thank you for your time.<br />
<br />
Regards,<br />
EVS.
Find more posts tagged with
Comments
vensw
By the way, I'm using BIRT 2.3.2
Regards,
EVS
vensw
Help please..
vensw
Help needed on this topic please....
mwilliams
This report shows the label in the masterpage footer only on the last page if you run it in the web viewer and export to PDF from there so that the run and render tasks are used separately. Hope this helps.
vensw
Could you please explain the logic real quick?? Appreciate your help.<br />
<br />
<br />
Regards,<br />
EVS.<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="78470" data-time="1308070833" data-date="14 June 2011 - 10:00 AM"><p>
This report shows the label in the masterpage footer only on the last page if you run it in the web viewer and export to PDF from there so that the run and render tasks are used separately. Hope this helps.<br /></p></blockquote>
mwilliams
In the masterpage, I put the label with "last page only" as the text. In the onRender script, I put:
if (pageNumber < totalPage){
this.getStyle().display = "none";
}
The needing to run it with the web viewer and then exporting to PDF is so that the onRender happens separately from the onCreate. This is what makes the totalPage value correct. Like on the other issue in your other post, you'll need to make sure that you have a page break interval set that ensures that the page break events will call or I don't think this works correctly in 2.3.2.