Display Person Image on BI Report
Display Person Image on BI Report

 1,345 total views

In this article we will look into adding the Person Image to BI Report.

Want to learn Fusion Technical tools? Checkout this article

Some of the clients want to create user friendly reports with employee images and use the bursting feature to address it to employees on Birthday’s or anniversaries. Some of the clients display the complete profile information of an employee along with the employee photo.

let’s create a simple Report to have the employee picture displayed on the output.

Employee images get stored in PER_IMAGES in BLOB field and the image can’t been seen as such in the data model.

SQL Query to get the images information from PER_IMAGES table:

SELECT A.PERSON_NUMBER,
B.DISPLAY_NAME,
C.IMAGE
FROM PER_ALL_PEOPLE_F A,
PER_PERSON_NAMES_F B,
PER_IMAGES C
WHERE A.PERSON_ID = B.PERSON_ID
AND B.NAME_TYPE='GLOBAL'
AND A.PERSON_ID = C.PERSON_ID

When you run this SQL Query in the Data Model, you will get the output like below:

Person Images Query Result in BLOB format.. PER_IMAGES fusion hcm oracle hcm cloud tables
Person Images Query Result

Now click on export to download the xml file and create a BI template with these fields.

Once you add all the fields into the template using the Table Wizard, the XML tag for the Image field will look as below:

Default tag for Image field will be <?IMAGE?> PER_IMAGES fusion hcm images extract
Default tag for Image field will be <?IMAGE?>

With this template, we will get the BLOB output that we saw on the data model screen only. However our requirement is to capture the employee image on the Output and not this BLOB output.

Let’s update the tag for this IMAGE field to:

<?if:IMAGE!=' '?> 
<fo:instream-foreign-object content-type="image/jpg" height="1 in" width="1 in"><?IMAGE?></fo:instream-foreign-object>   
<?end if?>

This code will convert the BLOB text to image.

Modified Code for IMAGE PER_IMAGES fusion hcm oracle hcm cloud bi publisher report
Modified Code for IMAGE

Just double click IMAGE filed.. go to Advanced tab and copy paste the above code and click OK. Save the template and upload it to BI Report.

Final output would be like below:

Person Images Output from Fusion HCM using BI Report from BLOB image
Person Images Output

However if the employee count is huge and you try to run the report for all employees at once, you might get an error that “Report data size (2667550510 bytes) exceeds the maximum limit (2147483648 bytes). Stopped processing.” In such cases add some filters by Legal Entity, Business Unit, Department, Job etc to get your requirement achieved.

Tip: We can use the same approach for any BI Report which needs to use Person Images on the output. There are some settings in the code that you can change to change the height and width of the image that is being displayed.

Join our fastest growing technology social groups to interact with experts in the Fusion space and get your queries resolved – Telegram group, Facebook Page and LinkedIn Group

The following two tabs change content below.
Sricharan is a Fusion HCM Solution Architect with over 13+ years of overall experience and 5+ years of Fusion experience. He is passionate about technical aspects of Fusion HCM and writes interesting articles on HCM Extracts, HCM Data Loader, Fast Formula, BI Publisher, Integrations and Automation etc.

This Post Has 5 Comments

  1. Santosh

    hi Sricharan, Nice stuff, as always.

    If anyone would like to get the same within OTBI, these are the steps:

    1) Create a dummy column
    2) Edit its formula https:///hcmUI/personImage?personId=
    3) Embed person_id from Worker folder
    4) Select html under Data Format and paste the URL

    The only disadvantage, images displayed cannot exported.
    Thanks,
    Santosh

    1. Sricharan

      Thanks.. I didn’t know that we could also display images on otbi..

  2. Santosh

    Maybe you could enhance the same article to include OTBI as well 🙂

  3. Sricharan

    Sure.. Will post a new article on it when i get some time.. Most of the viewers don’t check the article they have seen, so it might go unnoticed if i update the existing article.

  4. khader

    Very helpful information sricharan..Thank you so much posting this kind of articles..

    Please post some articles about HDL..

Leave a Reply