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)
Getting the footer only on the last page
SaranyaPK
Hey,
I am trying to get the footer only on the last page of my pdf.
I have to generate a pdf file.My birt picks the data from the flat file(tab seperated file) in a table and displays it.
But the page where the table ends (it can extend to more than one page)is the last page of my pdf and I want to display some information in the footer of this last page reading it from the report parameters.
How can I implement this?
I tried it by writing the script in onRender() of the footer component.
if (BirtComp.lessThan(pageNumber, totalPage))
{
this.getStyle().display = "NONE";
}
But this does'nt works in my case. Since,I need to run birt only in one phase.
Find more posts tagged with
Comments
kclark
What version of birt are you running? I added a label to the footer of the masterpage and then added this script in the onRender() of the label in 3.7.1<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if(pageNumber < totalPage){
this.getStyle().display ="none"
}</pre>
SaranyaPK
Hey,
I am using the birt 2.5.1.
This script I also tried putting the footer in the master page.
But,it works only if we generate the report via web viewer and then export it as pdf.
If I directly generate report as pdf,it does'nt works.
And my requirement is to generate the report using the java component and java component runs the report as view in pdf(not via web viewer).
Jozef
I have the same problem as SaranyaPK.
I am using the birt 3.7.2.
I also tried putting the footer in the master page.
If I directly generate report as pdf, it doesn't work.
And my requirement is to generate the pdf report using the java class, not the viewer.