Wednesday, 14 October 2015

Displaying images in a Report

This document shows user how to include images in report
           By assumption we will upload a image to work space and call that particular image through HTML using image name and displays in classical or  interactive report.
Another way is that, the user can able to retrieve images from the Database.

ØUser able to know prior information about subject
ØFaster Turnaround.
ØReport is used to get the information if user include an will be more helpful.

Steps to display images in report
Step1: Create a new page
Step 2: Create a region èreportèclassical or interactive reportèName for the reportèSQL queryè follow the  below query
  Case and Decode both  methods can be done. Based on Requirement modify the query.
                  WHEN gender = 'MALE' AND emp_image IS NULL
 '<img src="#WORKSPACE_IMAGES#not_found_male.jpg" width="75px;" height="75px;"/>'   // uploaded default male icon in workspace and checking for the condition image is available in table or not.
                  WHEN gender = 'FEMALE' AND emp_image IS NULL
'<img src="#WORKSPACE_IMAGES#not_found_female.jpg" width="75px;" height="75px;"/>'  // uploaded default Female icon in workspace ans checking for the condition image is available in table or not.
                  WHEN emp_image IS NOT NULL  // if  the image already available in the database
 '<img alt="'       //HTML tag 
                          || apex_escape.html_attribute (c.first_name)  // this function returs name of the employee
                          || '" title="'
                          || apex_escape.html_attribute (c.first_name) 
                          || '" style="border: 4px solid #CCC; -moz-border-radius: 4px; -webkit-border-radius: 4px;" ' //Giving style for the image using HTML tag
                          || 'src="' 
                          || apex_util.get_blob_file_src ('P61_EMP_IMAGE',
                                                         )  // Generates a call to the apex_util.get_blob_file that can be used to  download a BLOB column content
    -- Only generates usable output if called from a valid APEX session
'P61_EMP_IMAGE'èName of valid application page ITEM that with type FILE, and source type of  DB column
c.party_idè Primary key column
                          || '" height="75" width="75" />'
               END "img"
Step 3: Make the report column as standard report column
Report attributesècolumn nameè  column attributes display as standard report column.

 Sample screen shot 
sample screen shot show the image in classical report

The user Fetch images  from Database also display images in report using APEX.


  1. Hi Doyen, I am trying to display images in an IR, but I got a square with a cross instead of the image, your post is helpful but I have trouble to understand exactly what to set in Step 3, I don't find Column Name in Report attributes, is it a Region property? or a Column property? or the Report attributes properties?
    I am running Apex 5 and I don't find the property to set.
    I know the get_blob_file_src is getting the data properly because I display the column as text and has all the a, p, I, p_pk data

    Thanks in advance

  2. Regards
    Sridevi Koduru (Senior Oracle Apps Trainer
    LinkedIn profile -
    Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at | +91 - 9581017828.

  3. Oracle apps and Fusion Self Paced Training Videos by Industry Experts. Please Check

  4. Good Blog, well descrided, Thanks for sharing this information.
    Oracle Fusion HCM Online Training


  5. Iam so thrilled because of finding your alluring website here.Actually i was searching for Oracle APEX.Your blog is so astounding and informative too..Iam very happy to find such a creative blog. Iam also find another one by mistake while am searching the same topicOracle SOA.Thank you soo much..