Iframe of a Blob Content in Apex form/report

Hi All
I am developing a application where users will upload documents which will be stored in blob column. Now the requirement is to show the document with in the page using Iframe. Can some one please suggest the steps to show the blob content in iframe.
Thanks in Advance.
regards
Srini.

You can show the documents in an iframe only if your browser has an appropriate plugin (like to most browsers have it for pdf documents). Otherwise you will be forced to either save the document or open it with the appropriate programm. Means, your application will probably fail to show the documents in an iframe for all other document types other than pdf.
I have no special case explaining how to display a document in an iframe but you can inspect it here:
http://apex.oracle.com/pls/apex/f?p=31517:15
and
http://apex.oracle.com/pls/apex/f?p=31517:58
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
http://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
-------------------------------------------------------------------

Similar Messages

  • See BLOB contents on Oracle FORMS

    Is there anyway that I can see the BLOB object contents in Oracle Forms? For example, if I have a word document in BLOB, I should be able to open it in Oracle forms. I've already posted this today, but just for clarification, I'm reposting this with exact requirements. My client wishes to see data from a table and in that a BLOB object is one of the columns. For each row, there is a word document, which should also be displayed (or at least a link) on Form. If clicked on the link, the BLOB content, i.e., the word document should get opened. Please let me know if there is any way. Francois was trying to help me, I think this explanation makes it clear for him and also others. I don't have webutil library and my Forms version is 6.0.8.18.3. Please help me soon. I'm in an urgent realease this weekend and need this deliberately. It is not possible to upgrade to newer version for me.
    Thanks
    Sarma.

    In fact, I just had to do this today. It works as expected using an image item on the BLOB column. I am at 10.1.2.0.2, if that makes any difference. Are you positive you have data in the BLOB column? I noticed that after loading a table with image items, I used SQL Developer to look at the table to ensure there was data in the rows. After that, the images no longer appeared in the form. I had to reload the table, then all was well again.

  • Display Blob content in Apex

    Hi folks
    I hope you can see HTML Expression code now.
    I have PDFs stored in BLOB columns along with FILE_ID column in the database.
    I want to display these to the APEX user on the page at runtime.
    I have created a SQL Query report page to display FILE_ID column.
    I am using HTML Expression property of the FILE_ID column to pull the image from the table using PROC_DISPLAY_DOCUMENT procedure.
    I typed folowing code int the HTML Expression text area of the FILE_ID column of the report page :
    [!-- img src="#OWNER#.proc_display_document?p_id=#file_id#" ]
    I am using following Procedure code:
    create or replace procedure "PROC_DISPLAY_DOCUMENT"(p_id number) **
    mimetype varchar2(48);
    n_length number;
    s_filename varchar2(400);
    lob_image blob;
    Begin
    select MIME_TYPE,dbms_lob.getlength(blob_content),file_name,blob_content
    into s_mime_type,n_length,s_filename,lob_image
    from tbl_upload_file
    where file_id = p_id;
    owa_util.mime_header(nvl(s_mime_type, 'application/octet' ),false);
    --set the size so the browser knows how much it will be downloading
    htp.p( 'content-length: '|| n_length );
    --The file name will be used by the browser if the users does a "save as"
    htp.p( 'content-Disposition: filename="' || s_filename ||'"');
    owa_util.http_header_close;
    --Download the BLOB
    wpg_docload.download_file( lob_image );
    exception
    WHEN NO_DATA_FOUND THEN
    RAISE_APPLICATION_ERROR(-202121,'Record matching screenfield filename not found, PROC_DISPLAY_DOCUMENT.');
    end;
    --This is very Important
    --grant execute on PROC_DISPLAY_DOCUMENT to public;
    This code does not work and Apex report does not display PDF image.
    Any help to troubleshoot this code will be appreciated.
    Thank you in advance.
    Jaya

    create or replace procedure "PROC_DISPLAY_DOCUMENT"(p_id number) **
    mimetype varchar2(48); ... Doesn't look correct to me. What are the ** for?
    Does the procedure compile?
    This code does not workHow did you come to this conclusion? Any error message you got?

  • Open BLOB Content from an Interactive Report in a New Window

    Hi All,
    I have an Interactive Report with the following query:
    SELECT ID,
      FILE_NAME,
      FILE_MIME_TYPE, 
      FILE_CHARACTER_SET, 
      DBMS_LOB.GETLENGTH(FILE_CONTENT) FILE_CONTENT, 
      FILE_LAST_UPDATED 
    FROM FILESThe Number/Date Format property for the FILE_CONTENT column is as follow:
    DOWNLOAD:FILES:FILE_CONTENT:ID::FILE_MIME_TYPE:FILE_NAME:FILE_LAST_UPDATE:FILE_CHARACTER_SET:attachment:DownloadWhen I click on the FILE_CONTENT link in the report, depending on the type of file, it opens in a new window or in my report’s window.
    I am trying to set the link to always open the content in a new window. I tried changing the Link Attributes to target="_blank" but it did not work.
    There is an example in the Package Application “Sample File Upload and Download” on apex.oracle.com. Page 1 has a report that allows you to add files. You can add files such as PDF, SQL, or TXT file in order to replicate my situation.
    I appreciate any help!
    Thanks,
    Erick

    The problem is solved!
    Apparently the Content Disposition: Attachment in the BLOB Download Format Mask does the trick.
    For some reason I have to logout and login again in the application to see the change.
    I tried changing the Content Disposition to Inline and then back to Attachment, and the file keeps opening in the same window unless I start a new session.
    Is there any explanation why it is working that way?
    Thanks!
    Erick

  • Create MS Word documents from data in an Apex Form/Report

    My requirement is to create editable RTF form letters from data managed by an Apex application. I do not have BI publisher available and am looking at using the XSL-FO route. Effectively I want the user to select the desired data in the Apex application, hit a button and be presented with a word document containing the data, which they can then customise.
    I know how to set Apex up to create PDFs based on reports using embedded XSL-FO but PDFs are not editable extra steps by the user. Also the user could export data to CSV and mailmerge with a word template but thats extra work for the user too.
    In the past I've used PLSQL/XML/XSL-FO with .NET to do what I want here by generating an XML file with PLSQL and using .NET to associate the XML file to XSLT/XSL-FO template files creating output as varied as .doc, .ps and .html files.
    Any ideas on acheving the same flexibility with Apex would be greatly appreciated. As my googling and forum hunting has not turned up much.
    Thanks
    FunkyMonkey

    Hi FunkyMonkey,
    Do you know Docufy | Simplify with docufy ? It's an APEX application that lets you create/generate/edit word templates. Else JasperReports Library | Free software downloads at SourceForge.net lets you generate a multitude of report formats (RTF/pdf/docx/xlsx/xml/etc.) you can use iReports to easily create xml templates for the reports, It's a lot simpler then xsl-fo.
    Regards,
    Vincent Deelen

  • Apex forms

    Hi,
    I have a few newbie questions (basic) and will appreciate if someone can answer them..
    1) How to find in which schemas is the APEX forms and reports PL/SQL stored?
    2) How to find in which schemas is the APEX forms/reports data stored?
    2) What schemas are the normal Oracle forms, reports (not apex) associated with?
    Thanks!

    The PL/SQL code that forms part of an apex 'form' is held within the database but not as a procedure in it's own right, it is a bit of code within a field in an apex table.
    However that code could be held in various different tables within the apex flows schema (indeed as part of your form you may has js functions that are held on the file system, as well as images that contribute to it... and on and on and on...) .
    When you say you are now familiar with apex database schematics I fear that you may not quite understand the application. Again, what are you really wanting to know?
    Cheers
    Ben

  • Form & Report on a Webservice

    Hi,
    When I try to build a Form & Report on a web service(XDB web service), it won't allow me to build it by throwing an error message.
    The error message is ORA-20001: Unable to create form on table. ORA-20001: Query must begin with SELECT or WITH
    The webservice reference is a manually created simple soap envelope.
    <soapenv:Envelope xmlns:oraw="http://xmlns.oracle.com/orawsv" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Header>
        </soapenv:Header>
       <soapenv:Body>
          <oraw:query>
             <oraw:query_text type="SQL">SELECT * FROM ORDERS</oraw:query_text>
          </oraw:query>
       </soapenv:Body>
    </soapenv:Envelope>The form contains the input items needed for basic authentication. If I check the same soap envelope with SoapUI, or test the webservice reference in APEX it returns the result set with no issues.
    What could be the cause with apex form & report on webservice
    The Apex version is 4.0.0.00.46

    Hi,
    Yes I can build a webservice reference from the wsdl. But then it will recognize all other input attributes except for the crucial attribute <oraw:query_text type=""></oraw:query_text> . That's why I tend to create the soap envelope manually.
    Thanks

  • BLOB content download link on apex report

    Hi Guys,
    I have a simple form where user can attach file and save the records. I iterate through wwv_flow_files and get the file and save it to a custom table which has BLOB column. On another report page i display uploaded file details. What i need is, there must be a column with download link when user clink the link appropriate file should be downloaded. How can i do this ?
    Really appreciate if someone can assist me on this.
    Thanks Guys.

    See About BLOB Support in Forms and Reports.
    There's an OBE tutorial that followed the introduction of declarative BLOB support in 3.1 as well. (An earlier version but it is still relevant to APEX 4.x.)
    (Please make an effort to consult the documentation and thoroughly search the forum for previous coverage of a topic. This is a much discussed question.)

  • How to insert data from APEX form into two tables

    Hi,
    I'm running APEX 4.1 with Oracle XE 11g, having two tables CERTIFICATES and USER_FILES. Some of the (useless) fields are cut to reduce information:
    CREATE TABLE CERTIFICATES
    CERT_ID NUMBER NOT NULL ,
    CERT_OWNER NUMBER NOT NULL ,
    CERT_VENDOR NUMBER NOT NULL ,
    CERT_NAME VARCHAR2 (128) ,
    CERT_FILE NUMBER NOT NULL ,
    ) TABLESPACE CP_DATA
    LOGGING;
    ALTER TABLE CERTIFICATES
    ADD CONSTRAINT CERTIFICATES_PK PRIMARY KEY ( CERT_ID ) ;
    CREATE TABLE USER_FILES
    FILE_ID NUMBER NOT NULL ,
    FILENAME VARCHAR2 (128) ,
    BLOB_CONTENT BLOB ,
    MIMETYPE VARCHAR2 (32) ,
    LAST_UPDATE_DATE DATE
    ) TABLESPACE CP_FILES
    LOGGING
    LOB ( BLOB_CONTENT ) STORE AS SECUREFILE
    TABLESPACE CP_FILES
    STORAGE (
    PCTINCREASE 0
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    FREELISTS 1
    BUFFER_POOL DEFAULT
    RETENTION
    ENABLE STORAGE IN ROW
    NOCACHE
    ALTER TABLE USER_FILES
    ADD CONSTRAINT CERT_FILES_PK PRIMARY KEY ( FILE_ID ) ;
    ALTER TABLE CERTIFICATES
    ADD CONSTRAINT CERTIFICATES_USER_FILES_FK FOREIGN KEY
    CERT_FILE
    REFERENCES USER_FILES
    FILE_ID
    NOT DEFERRABLE
    What I'm trying to do is to allow users to fill out all the certificate data and upload a file in an APEX form. Once submitted the file should be uploaded in the USER_FILES table and all the fields along with CERT_ID, which is the foreign key pointing to the file in the USER_FILES table to be populated to the CERTIFICATES table. APEX wizard forms are based on one table and I'm unable to build form on both tables.
    That's why I've created a view (V_CERT_FILES) on both tables and using INSTEAD OF trigger to insert/update both tables. I've done this before and updating this kind of views works perfect. Here is where the problem comes, if I'm updating the view all the data is updated correctly, but if I'm inserting into the view all the fields are populated at CERTIFICATES table, but for USER_FILES only the fields FILE_ID and LAST_UPDATE_DATE are populated. The rest three regarding the LOB are missing: BLOB_CONTENT, FILENAME, MIMETYPE. There are no errors when running this from APEX, but If I try to insert into the view from SQLDeveloper, I got this error:
    ORA-22816: unsupported feature with RETURNING clause
    ORA-06512: at line 1
    As far as I know RETURNING clause in not supported in INSTEAD of triggers, although I didn't have any RETURNING clauses in my trigger (body is below).
    Now the interesting stuff, after long tracing I found why this is happening:
    First, insert is executed and the BLOB along with all its properties are uploaded to wwv_flow_file_objects$.
    Then the following insert is executed to populate all the fields except the BLOB and it's properties, rowid is RETURNED, but as we know RETURNING clause is not supported in INSTEAD OF triggers, that's why I got error:
    PARSE ERROR #1918608720:len=266 dep=3 uid=48 oct=2 lid=48 tim=1324569863593494 err=22816
    INSERT INTO "SVE". "V_CERT_FILES" ( "CERT_ID", "CERT_OWNER", "CERT_VENDOR", "CERT_NAME", "BLOB_CONTENT") VALUES (:B1 ,:B2 ,:B3 ,:B4, ,EMPTY_BLOB()) RETURNING ROWID INTO :O0
    CLOSE #1918608720:c=0,e=11,dep=3,type=0,tim=1324569863593909
    EXEC #1820672032:c=3000,e=3168,p=0,cr=2,cu=4,mis=0,r=0,dep=2,og=1,plh=0,tim=1324569863593969
    ERROR #43:err=22816 tim=1324569863593993
    CLOSE #1820672032:c=0,e=43,dep=2,type=1,tim=1324569863594167
    Next my trigger gets in action, sequences are generated, CERTIFICATES table is populated and then USER_FILES, but only the FILE_ID and LAST_UPDATE_DATE.
    Finally update is fired against my view (V_CERT_FILES), reading data from wwv_flow_files it populates BLOB_CONTENT, MIMETYPE and FILENAME fields at the specific rowid in V_CERT_FILES, the one returned from the insert at the beginning. Last, file is deleted from wwv_flow_files.
    I'm using sequences for the primary keys, this is only the body of the INSTEAD OF trigger:
    select user_files_seq.nextval into l_file_id from dual;
    select certificates_seq.nextval into l_cert_id from dual;
    insert into user_files (file_id, filename, blob_content, mimetype, last_update_date) values (l_file_id, :n.filename, :n.blob_content, :n.mimetype, sysdate);
    insert into certificates (cert_id, cert_owner, cert_vendor, cert_name, cert_file) values (l_cert_id, :n.cert_owner, :n.cert_vendor, :n.cert_name, l_file_id);
    I'm surprised that I wasn't able to find a valuable source of information regarding this problem, only MOS note about running SQLoader against view with CLOB column and INSTEAD OF trigger. The solution would be to ran it against base table, MOS ID 795956.1.
    Maybe I'm missing something and that's why I decided to share my problem here. So my question is how do you create this kind of architecture, insert into two tables with a relation between them in APEX ? I read a lot in the Internet, some advices were for creating custom form with APEX API, create a custom ARP, create two ARP or create a PL/SQL procedure for handing the DML?
    Thanks in advance.
    Regards,
    Sve

    Thank you however I was wondering if there was an example available which uses EJB and persistence.

  • SOLUTION - How to display a BLOB content in Portal Report

    Courtesy of Kelly Wong:
    1. Every time a record of the file information is inserted into the
    PORTAL30.WWDOC_DOCUMENT table while you inserted a record to the blob
    field in a portal form that you created.
    [The fact that a file uploaded appears in the WWDOC_DOCUMENT table is actually a side-effect of Forms file upload, this may change in a future version. However this example gives a pretty good solution to the problem - Dmitry]
    2. If you describe the PORTAL30.WWDOC_DOCUMENT table, you will find
    that a few of the columns are: NAME, FILENAME, MIME_TYPE, BLOB_CONTENT,
    CREATOR, etc.
    3. I created a pl/sql procedure that takes a NAME parameter.
    The code of the procedure is as follows:
    CREATE OR REPLACE Procedure get_url
    (V_FILENAME IN VARCHAR2)
    IS
    url varchar2(100);
    BEGIN
    url := '/pls/portal30/docs/'&#0124; &#0124;v_filename;
    portal30.wwv_redirect.url(p_url =>url);
    END;
    4. I then created a portal report, select NAME, FILENAME, MIMETYPE,
    CREATOR fields from PORTAL30.WWDOC_DOCUMENT. (remember, no BLOB_CONTENT
    field is selected!) My select statement is:
    SELECT '<A
    HREF="scott.get_url?v_filename='&#0124; &#0124;name&#0124; &#0124;'">'&#0124; &#0124;filename&#0124; &#0124;'</A>' filename,
    name,mime_type,creator
    from portal30.wwdoc_document
    where creator = 'KELLY'
    You can see that I am passing in "NAME" instead of "FILENAME" into the
    get_url procedure because the it needs the "NAME" info to display the
    file.
    Actually, the content in the NAME column is something like:"563.TXT",
    and the content in the FILENAME column is "F15675/IPORTAL_LOCAL.TXT".
    The hyperlink can be either on the NAME or FILENAME field, as long as
    you pass in the content of "NAME" into the procedure.
    And it should be fairly easily to substring the FILENAME to show only
    "IPORTAL_LOCAL.TXT" if the client doesn't like to see the number
    portion.
    That is, when I click on the link, I am able to see my file in a new
    browser window.The only drawback in this scenario is if there is a link
    from your document to a portal component (form/report), it may not link
    to the form/report. If there are links in the document link to other
    document (html, txt, etc.), it will be no problem. It just open the
    document in another browser window.
    Please feel free to give me any comment on this and post it to the forum
    if needed. I just don't want to search for the original questions in
    the forum and attach the reply to it.
    Regards;
    Kelly.

    Is this method working also for portal 3.0.9?
    I can't get it to work.
    Is there a way do put a link to download the content of a blob field inside a report in version 3.0.9 that comes with iAS 1.0.2.2?
    Thank's in advance
    Mauro

  • Downloading blob content from a custom table

    In our hosted Apex application, the following code from the Application Express Developer's Guide works great for allowing a user to download blob content from one of our custom tables via a download button. However, the code doesn't work on the Oracle Cloud because the "owa_util" package is no longer available. The code is as follows:
    CREATE OR REPLACE PROCEDURE download_my_file(p_file in number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM file_subjects
    WHERE id = p_file;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    owa_util.http_header_close;
    -- download the BLOB
    wpg_docload.download_file( Lob_loc );
    end download_my_file;
    Besides using web services, does anyone know of a way to do this? Is there a way to add access to the "owa_util" package in the cloud? I have also tried apex_util.get_blob_file_src but that is also unavailable in the Oracle Cloud.
    Thanks,
    Steve

    Following Joel's advice:
    The way I solved this was to split the code between two page processes and one application process. The download button first calls a page process to move the report data into a blob column and then calls another page process which is of "run application process" type. This calls the application level process where the download code, shown below, is called.
    Notice the following changes to the code from the one posted earlier (also from Joel)
    1) added sys.htp.init;
    2) "sys." to all htp, owa and wpg_docload calls
    3) added apex_application.stop_apex_engine; after the wpg_docload statement at the bottom of the script.
    Now the download button launches a "save as" dialog box and the report content is downloaded to the client.
    The code now looks like:
    CREATE OR REPLACE PROCEDURE download_my_file(p_file in number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM oehr_file_subject
    WHERE id = p_file;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    sys.htp.init;
    sys.owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    sys.htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    sys. htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    sys.owa_util.http_header_close;
    -- download the BLOB
    sys.wpg_docload.download_file( Lob_loc );
    apex_application.stop_apex_engine;
    end download_my_file;
    Thanks Joel for your help.
    Steve

  • Display blob content as pdf file

    Dear Expert,
    Currently i'm using oracle apex 3.0.1.
    I'm having a problem on displaying blob content (from database table) as pdf file on oracle application express but i'm able to save to download the pdf.
    Below is the procedure that i used to display blob content,
    PROCEDURE lf_html_pdf (pv_image IN VARCHAR2, pv_index IN NUMBER) is
    l_mime VARCHAR2 (255);
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    BEGIN
    begin
    selecT OI_BLOB,DBMS_LOB.getlength (OI_BLOB)
    into lob_loc,l_length
    from ord_img
    where oi_tno= pv_image
    and oi_ti='PDF'
    and oi_idx=pv_index;
    exception
    when others then
    null;
    end;
    OWA_UTIL.mime_header (NVL (l_mime, 'application/pdf'), FALSE);
    HTP.p ('Content-length: ' || l_length);
    OWA_UTIL.http_header_close;
    WPG_DOCLOAD.download_file (lob_loc);
    END lf_html_pdf;
    I get the error message as below when i execute the procedure above;
    Error report:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 356
    ORA-06512: at "SYS.OWA_UTIL", line 415
    ORA-06512: at "HCLABPRO.PKG_PDF", line 220
    ORA-06512: at line 2
    *06502. 00000 - "PL/SQL: numeric or value error%s"*
    I'm appreciated if expert can have me on the problem above?
    Thanks
    From junior

    *Always post code wrapped in <a href=http://wikis.sun.com/display/Forums/Forums+FAQ#ForumsFAQ-Arethereanyusefulformattingoptionsnotshownonthesidebar?"><tt>\...\</tt> tags</a>:*
      PROCEDURE lf_html_pdf (pv_image IN VARCHAR2, pv_index IN NUMBER) is
         l_mime        VARCHAR2 (255);
         l_length      NUMBER;
         l_file_name   VARCHAR2 (2000);
         lob_loc       BLOB;
      BEGIN
          begin
            selecT OI_BLOB,DBMS_LOB.getlength (OI_BLOB)
            into lob_loc,l_length
            from ord_img
            where  oi_tno= pv_image
              and oi_ti='PDF'
              and oi_idx=pv_index;
          exception
                when others then
                null;
            end;
         OWA_UTIL.mime_header (NVL (l_mime, 'application/pdf'), FALSE);
         HTP.p ('Content-length: ' || l_length);
         OWA_UTIL.http_header_close;
         WPG_DOCLOAD.download_file (lob_loc);
      END lf_html_pdf; Start by getting rid of:
          exception
                when others then
                null;and never using it anywhere ever again.
    If you're not actually going to use the <tt>l_mime</tt> and <tt>l_file_name</tt> variables then remove these as well. (Although I really think you should set a filename.)
    >
    Error report:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 356
    ORA-06512: at "SYS.OWA_UTIL", line 415
    ORA-06512: at "HCLABPRO.PKG_PDF", line 220
    ORA-06512: at line 2
    06502. 00000 - "PL/SQL: numeric or value error%s"
    >
    The error stack indicates that the exception is being raised in <tt>HCLABPRO.PKG_PDF</tt>: what is <tt>HCLABPRO.PKG_PDF</tt>? Does this actually have anything to do with the procedure above?
    I get the error message as below when i execute the procedure above;How do you execute it?
    What happens when it's executed without the <tt>when others...</tt> built-in bug?

  • Error downloading a BLOB file in APEX

    I am getting the following error when trying to download a blob in APEX
    invalid LOB locator specified\nORA-06512: at "SYS.WPG_DOCLOAD", line 52
    Below this line is my table script and the procedure code (which is part of a package)
    This is the column url link in my APEX SQL report: ua_baninst1.ua_bwskhonorsapp.p_download_file
    CREATE TABLE UA_SATURN.SWRHNRS_ATTACHMENTS
    SWRHNRS_ATTACHMENTS_PIDM INTEGER,
    SWRHNRS_ATTACHMENTS_APP_NO NUMBER(2),
    SWRHNRS_ATTACHMENTS_FILE BLOB,
    SWRHNRS_ATTACHMENTS_FILE_NAME VARCHAR2(100 CHAR),
    SWRHNRS_ATTACHMENTS_MIME_TYPE VARCHAR2(100 CHAR),
    SWRHNRS_ATTACHMENTS_ACTIV_DT DATE,
    SWRHNRS_ATTACHMENTS_USERID VARCHAR2(20 CHAR)
    PROCEDURE p_download_file
    IS
    l_fd_app_files_rec ua_saturn.SWRHNRS_ATTACHMENTS%ROWTYPE;
    BEGIN
    SELECT swrhnrs_attachments_pidm, swrhnrs_attachments_app_no,
              swrhnrs_attachments_file,
              swrhnrs_attachments_file_name,
              swrhnrs_attachments_mime_type,
              swrhnrs_attachments_activ_dt,
              swrhnrs_attachments_userid
    INTO l_fd_app_files_rec
    FROM ua_saturn.SWRHNRS_ATTACHMENTS
    where swrhnrs_attachments_pidm = 1360706 --p_pidm
              and swrhnrs_attachments_app_no = 1 --p_app_no
              and lower(swrhnrs_attachments_file_name) = 'taylor_mattingly_resume_draft.doc'; lower(p_file_name);
              -- parameters will come back in later after I get it working --
         -- Set up HTTP header
         -- Use an NVL around the mime type and if it is a null, set it to
         -- application/octect - which may launch a download window from windows
         owa_util.mime_header(NVL(l_fd_app_files_rec.swrhnrs_attachments_mime_type, 'application/octet'), FALSE);
         -- Set the size so the browser knows how much to download
         --htp.p('Content-length: ' || l_fd_app_files_rec.file_size);
         htp.p('Content-length: ' || dbms_lob.getlength(l_fd_app_files_rec.swrhnrs_attachments_file));
         --Use the next line for images only!!!
         --htp.p('Expires: ' || TO_CHAR(SYSDATE + 1/24, 'FMDy, DD Month YYYY HH24:MI:SS') || 'GMT');
         -- The filename will be used by the browser if the users does a "Save as"
         htp.p('Content-Disposition: attachment; filename="' || l_fd_app_files_rec.swrhnrs_attachments_file_name || '"');
         -- Close the headers
         owa_util.http_header_close;
         -- Download the BLOB
         wpg_docload.download_file(l_fd_app_files_rec.swrhnrs_attachments_file);
         --END IF;
    END p_download_file;
    Any help is greatly appreciated.
    Thanks,
    Andrew

    Figured out my problem. My table and APEX app were set to one schema and my stored procudure was in another schema. Putting them all in the same schema fix the LOB error.

  • Diaplay BLOB content (jpeg picture) in XML Publisher 5.6.3

    Hi Gurus,
    I am trying to include BLOB content (jpeg picture) in my RTF template.
    But the pdf output giving blank page.
    I am using following syntax in my picture form field.
    <fo:instream-foreign-object content-type="image/jpg" width="251.8pt"
    height="174.3pt">
    <xsl:value-of select="FILE_DATA"/>
    </fo:instream-foreign-object>
    Can you please correct me where I am doing wrong..?
    Many Thanks..!

    Hello Friends,
    Can anyone help me to resolve this issue please..!
    Below is the error from OPP service log.
    [6/14/10 3:33:34 PM] [UNEXPECTED] [54042:RT1236433] java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.charAt(String.java:687)
         at oracle.apps.xdo.common.encoding.Base64Util.decode(Base64Util.java:54)
         at oracle.apps.xdo.template.fo.elements.FOInstreamForeignObject.end(FOInstreamForeignObject.java:71)
         at oracle.apps.xdo.template.fo.FOHandler.endElement(FOHandler.java:455)
         at oracle.apps.xdo.common.xml.XSLTHandler$EEEntry.sendEvent(XSLTHandler.java:594)
         at oracle.apps.xdo.common.xml.XSLTMerger.startElement(XSLTMerger.java:51)
         at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:206)
         at oracle.apps.xdo.template.fo.FOProcessingEngine.process(FOProcessingEngine.java:320)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:1051)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5936)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3459)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3548)
         at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:296)
         at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:173)
    [6/14/10 3:33:34 PM] [54042:RT1236433] Completed post-processing actions for request 1236433.
    Many Thanks..!

  • How to show Blob column in APEX application

    I have table with blob. The images are loaded through a scheduled night process. These are not the images uploaded using APEX. How can I show these images using APEX?
    Thank you,

    Hello user,
    Although the purpouse of this blog post bij Dimitri is quite different, you can see in the 3th and 4th picture what you need to do: http://dgielis.blogspot.com/2008/07/show-blob-of-other-table-in-apex-form.html
    Greetings,
    Rutger
    http://rutgerderuiter.blogspot.com/
    ===============================================================================
    You can reward this reply by marking it as either Helpful or Correct ;-)

Maybe you are looking for