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
ØReport is used to get the information if user include an image.it 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
|| 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" />'
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.