first, read Defining and Viewing BLOB Data in Oracle Application Express 3.1 and above carefully,
because you are doing mistake to create blob table,
you are not define Pk,filename column and mimetype of given blob table
these things affect on report image dispaly..
first modify table, i have added filename and mimetype column.
you are calling link
on print button but there is no zero page defined.
There is no problem displaying the image from the blob field in a page.
secondly the print button is calling a report query which is associated with a RTF template and I have the to display different image in the RTF base on the selected company. And DISPLAY_COMP_LOGO is a procedure that reads the blob and download. I can get other date in the RTF except the image(logo file). I have also executed the procedure separately and it is working fine. Any idea why the image is not appearing in the RTF.
apex_application.get_g_base_href||'#OWNER#.DISPLAY_COMP_LOGO?P_COLO_REFNO='||COLO_REFNO as COMP_LOGO
where colo_refno =:P2_COLO_REFNO
read following about pdf and rtf export which is in german language translate to english and read,
it also contains packaged application Example to download.
Hope this helps.
Fix the problem.
There are multiple issue to the problem.
to start with the procedure
PROCEDURE SAMPACC."DISPLAY_COMP_LOGO" (p_refno number)
-- you can select it from any of your own table where you r storing the image
into l_logo, l_length
from company_locations where colo_refno = p_colo_refno;
HTP.p ('Content-Disposition: attachment; filename="'||'CompanyLogo'||'"');
HTP.p ('Content-length: ' || l_length);
create a public SYNONYM DISPLAY_COMP_LOGO FOR <schemaname>.DISPLAY_COMP_LOGO;
grant execute on DISPLAY_COMP_LOGO to anonymous,public,APEX_PUBLIC_USER
then login using system user to the database and set the current schema to <apex_Versionno>
e.g. Alter session set current_schema APEX_040200
for apex 4.2
modify the following function to include you procedure name
after modification the function should look like this. if you have return false after begin comment it.
procedure_name in varchar2)
-- Administrator note: the procedure_name input parameter may be in the format:
-- If the expected input parameter is a procedure name only, the IN list code shown below
-- can be modified to itemize the expected procedure names. Otherwise you must parse the
-- procedure_name parameter and replace the simple code below with code that will evaluate
-- all of the cases listed above.
if upper(procedure_name) in (
next create the sql
login to apex select your application -> shared Components under report select report query and create a query
and call the procedure with parameter e.g
select apex_application.get_g_base_href||'#OWNER#.DISPLAY_COMP_LOGO?P_COLO_REFNO='||COLO_REFNO as COMPLOGO from company_location
create a template and insert an image where you want to display the logo.
select the image and right click and select Format picture and on the property dialog box go to the last tab and input the following in alt text field
save the template and upload into your application then go the report query and select the template.
you can run this from your application. If you do test report in the report query then you need to change the #OWNER# to your schema name.
I have used my own table Company location in the explanation. I have created an application in apex.oracle but it is not working because I can not modify the function as
well as creating public synonym. Hope this will help.