7 Replies Latest reply on Feb 22, 2014 6:15 AM by pkpanda

    Dynamic image not displaying in BI Report



      I have developed a BI letter where I am displaying the logo dynamically. I have stored the image file in a table BLOB field then download the image using a procedure. I have used the URL in my report SQL and modified the alternate text on the image but I still not able to display the image.


      I have created a test app in oracel.apex

      workspace PKTEST

      user pktest

      pass 123test


      I have checked the old post and done accordingly but it is not working.

        • 2. Re: Dynamic image not displaying in BI Report

          I want to display the image on my PDF document. In the application if you click Print Button it generate the PDF.

          • 3. Re: Dynamic image not displaying in BI Report



            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.


            • 4. Re: Dynamic image not displaying in BI Report

              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.


              select COLO_LOCATION_NAME,

              apex_application.get_g_base_href||'#OWNER#.DISPLAY_COMP_LOGO?P_COLO_REFNO='||COLO_REFNO as COMP_LOGO



              where colo_refno =:P2_COLO_REFNO

              • 5. Re: Dynamic image not displaying in BI Report



                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.


                PDF-Ausgabe mit dynamischen Bildern


                Hope this helps.


                • 6. Re: Dynamic image not displaying in BI Report

                  Thanks Pars,


                  I have already checked the document and it does not have any RTF template to generate PDF. As I mention in my previous reply I don't have problem displaying the image in IR or classic report. I want different logo to appear on the PDF which is generated from a RTF Template.

                  • 7. Re: Dynamic image not displaying in BI Report

                    Fix the problem.

                    There are multiple issue to the problem.

                    to start with the procedure

                    PROCEDURE SAMPACC."DISPLAY_COMP_LOGO" (p_refno number)


                       l_logo    blob;

                       l_length number;




                      -- you can select it from any of your own table where you r storing the image 


                       colo_logo,DBMS_LOB.getlength (colo_logo)

                      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.


                    function wwv_flow_epg_include_mod_local(

                        procedure_name in varchar2)

                    return boolean




                        -- Administrator note: the procedure_name input parameter may be in the format:


                        --    procedure

                        --    schema.procedure

                        --    package.procedure

                        --    schema.package.procedure


                        -- 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 (

                              'SCHEMA.DISPLAY_COMP_LOGO') then

                            return TRUE;


                            return FALSE;

                        end if;

                    end wwv_flow_epg_include_mod_local;


                    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.