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 to put a different image for each page in the footer?
PhilippeP
Hi,
I need to put in the footer a different image for each page. Each image contains the page number. I need to create the report in PDF and I must use the runandRender. The images are in the resource folder. The file name is "page" + page number + ".png"
In the footer, I put the image with the script : ".\\page" + pageNumber + ".png"
But the pageNumber doesn't work in PDF.
I use the BIRT 3.7.2.
Could you tell me if there is a solution to get the page number?
Thanks
Find more posts tagged with
Comments
mwilliams
In on onRender of the image in the masterpage footer, this works for me:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
this.file = "Page" + pageNumber + ".png";
</pre>
PhilippeP
Hi Michael,
Thanks for your help.
With the BIRT Report Viewer the code is very good. But I have always the problem in PDF. there is always the image with the number 1 for all pages of the report.
I can't use export PDF in the BIRT Report because I add the report at the existing process.
In attach, a zip with the new_report_4.rptdesign, the images and the in PDF 7_View_Report_as_PDF.pdf.
PhilippeP
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="116424" data-time="1367547701" data-date="02 May 2013 - 07:21 PM"><p>
In on onRender of the image in the masterpage footer, this works for me:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
this.file = "Page" + pageNumber + ".png";
</pre></p></blockquote>
<br />
Hi Michael, <br />
<br />
Thanks for your help.<br />
<br />
With the BIRT Report Viewer the code is very good. But I have always the problem in PDF. there is always the image with the number 1 for all pages of the report. <br />
<br />
I can't use export PDF in the BIRT Report because I add the report at the existing process.<br />
In attach, a zip with the new_report_4.rptdesign, the images and the in PDF 7_View_Report_as_PDF.pdf.<br />
<br />
mwilliams
If you set a page break interval of 5 on the table, it'll work.
megha_m
hi Can you please tell me how do I add an image as a header or footer while exporting my report as a PDF? It will be a great if you could help me on this, since I m new to the BIRT scripting.
Thanks,
Megha
mwilliams
So, you just want the image on PDF, but no other output? Is this correct? If so, you should be able to add the image to the footer, then use the visibility property to hide/show the image for specific outputs.
megha_m
Yes I want that image to appear in PDF output only for time being. But I don't know how do I add the image, since my image is being uploaded from the web application by our user. So I will need to access that image and add it to the PDF generated. I am not getting a way to integrate this BIRT PDF generated report with my java code to achieve the goal.
mwilliams
You could pass the name/location of the image file to the report via parameter or through the appContext, then use the value to determine which image to show. The visibility in PDF can still be set using the visibility property.
kidtorres
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="116759" data-time="1368553391" data-date="14 May 2013 - 10:43 AM"><p>
You could pass the name/location of the image file to the report via parameter or through the appContext, then use the value to determine which image to show. The visibility in PDF can still be set using the visibility property.<br /></p></blockquote>
<br />
Hi Michael, I need your help, I want to put an imagen in the Header of the Master Page, but it depends on a value that I received on a parameter, so depending on that, I have to show the image.<br />
I have the URI of the image in a column of the data set, so I dont know how to make the script.<br />
Thank you in advance.
mwilliams
If you bind an image in the masterpage header to your dataSet that has the URI, you should be able to simply use the row value in the expression builder for the image URI. If you open the expression builder after binding the image to your dataSet, you should see the available column bindings section where you can choose your field. Hope this helps.