Adding Report logo and Header image as a URL
16 May, 2014
Hi !
We have been working on adding a logo on top of a report and setting an image in header once report is exported as a PDF. However, we cannot use straight forward approach which use uploaded images to Yellowfin since logo and header image(s) relate to logged user in our system, user type and client organisation. In other words, there are our system specific logic to determine which image should be used in for report logo and report header.
Therefore, we started working with another approach as describes on yellowfin forum post with modifications. As a initial step, report created with a calculated field with return value [code]
[/code]. Then, Http servlet added to Yellowfin's lib directory and modified web.xml file to map url path to "externalReportlogo.jpg" and point to this servlet. The servlet captures image request and initiate HttpURLConnection to get required image from external server. Finally, this report configured as co-display report in other reports.
This configuration works fine but we have few problems holding at the moment.
01. We cannot add URL as a header image(s) using following configuration.
Idea here is to implement same procedure as described above for header images as well. Is there a way to add report header image as a URL ?
02. Image is not included in exported PDF file. Export has been done both reports together and image report only, in both cases image is not included in PDF file.
Could you please suggest suitable modifications or approach to achieve our goals ?
Thank You
Supun
We have been working on adding a logo on top of a report and setting an image in header once report is exported as a PDF. However, we cannot use straight forward approach which use uploaded images to Yellowfin since logo and header image(s) relate to logged user in our system, user type and client organisation. In other words, there are our system specific logic to determine which image should be used in for report logo and report header.
Therefore, we started working with another approach as describes on yellowfin forum post with modifications. As a initial step, report created with a calculated field with return value [code]

This configuration works fine but we have few problems holding at the moment.
01. We cannot add URL as a header image(s) using following configuration.
Idea here is to implement same procedure as described above for header images as well. Is there a way to add report header image as a URL ?
02. Image is not included in exported PDF file. Export has been done both reports together and image report only, in both cases image is not included in PDF file.
Could you please suggest suitable modifications or approach to achieve our goals ?
Thank You
Supun
Hi Supun,
Thanks for the detailed info.
It looks both 1 & 2 is just how YF works.
1. You cannot use an image URL.
You will need to actually upload the image to the YF DB via the image manager. Only then can you select the image from this header setting.
2. I believe this is related to how the PDF is generated.
This is all done via the server request, and does not use the browser. Since you're using a library which the browser is calling, it works ok in the browser. But when exporting to PDF, the server does not know about this, so it cannot display.
I think the best way to achieve what you after is ;
-Store the images in your database as binary.
Ensure that each image is matched to a user/agency type.
-Create a source filter for the user that matches against the user & agency type.
-Now you can call these images via a normal report, and have it co-displayed at the top.
This will also export fine to PDF as I have just tested.
Also to add, many clients have created custom headers, though it�s usually per org, and not per agency & org. It can work fine with 1 level (e.g Client org level), though not a 2nd level (agency etc..) :( .
Here is the info on this : http://www.yellowfinbi.com/YFForum-How-to-customize-the-header-panel-system-header-for-different-client-orgs-?thread=159185#p3
The following post also provides info on how to setup company logos and have them use the appropriate logo based on client org : http://www.yellowfinbi.com/YFForum-How-does-Client-Organisation-Logo-work-?thread=143336
I hope this covers what your after and explains what is happening.
Please let me know if you have any questions on this.
Regards,
David
Thanks for the detailed info.
It looks both 1 & 2 is just how YF works.
1. You cannot use an image URL.
You will need to actually upload the image to the YF DB via the image manager. Only then can you select the image from this header setting.
2. I believe this is related to how the PDF is generated.
This is all done via the server request, and does not use the browser. Since you're using a library which the browser is calling, it works ok in the browser. But when exporting to PDF, the server does not know about this, so it cannot display.
I think the best way to achieve what you after is ;
-Store the images in your database as binary.
Ensure that each image is matched to a user/agency type.
-Create a source filter for the user that matches against the user & agency type.
-Now you can call these images via a normal report, and have it co-displayed at the top.
This will also export fine to PDF as I have just tested.
Also to add, many clients have created custom headers, though it�s usually per org, and not per agency & org. It can work fine with 1 level (e.g Client org level), though not a 2nd level (agency etc..) :( .
Here is the info on this : http://www.yellowfinbi.com/YFForum-How-to-customize-the-header-panel-system-header-for-different-client-orgs-?thread=159185#p3
The following post also provides info on how to setup company logos and have them use the appropriate logo based on client org : http://www.yellowfinbi.com/YFForum-How-does-Client-Organisation-Logo-work-?thread=143336
I hope this covers what your after and explains what is happening.
Please let me know if you have any questions on this.
Regards,
David
Thanks David, I think obtaining a binary image from our data base as you suggested is the best way do this.