CANNOT DISPLAY A WORD/EXCEL DOC IN BLOB FIELD INTO A PDF REPORT

We created a report that should display several kinds of documents at one time.
These documents are stored in BLOB columns in database. We had no problem to
display txt, gif or jpeg, but we could not display doc, xls, pdf or html
documents.
In this report we set three different fields in which display different kinds
of documents depending on mimetype. The first field has FileFormat property set
to 'Text' in order to display 'text/plain' and 'text/html' mimetype documents.
The second field has it set to 'Image', which allow to display 'image/bmp',
'image/gif', 'image/x-png', 'image/pjpeg' mimetypes. The third field has this
property set to 'OLE2', and here is where we would like to display other
mimetype documents as 'application/msword', 'application/vnd.ms-excel',
'application/pdf'.
We run the report on the web using:
http://<server>:<port>/dev60cgi/rwcgi60
?server=<report_server>
&report=<rdf_name>
&destype=localfile
&desname=<report_name.pdf>
&userid=<user>/<password>@orcl9i
&desformat=pdf
<6meters>
I have already read a lot of notes in Metalink but I could not find any
solution. Is there any way to display a Word/Excel document from database in a
report?
We tried to convert Word/Excel docs to html format, but when we tried to
display an HTML document in the report, we found that Oracle Reports displays
the source code instead of the HTML format document. So, this did not work.
What can we do?
We also read somewhere that a possible solution would be to convert Word/Excel
documents to a common format like GIF, JEPD or PDF. If processed as gif or jped
the file could be displayed in the report. If processed as pdf the document
could be linked in the report.
I tried to display a PDF in the report but a blank box is displayed. How can I
do this too?
Any solutions?

Hi,
I have the same problem. I need to show up a BLOB, word file(.doc), in a custom report. I made a simple query, extracting file_date( the column having the blog (.doc) file) from the database, in the report and placed it on a layout by assigning it to a field "F_1". I addressed the file format as OLE2.
But when I run the Report in APPS, it shows up an error "REP-1814: Report cannot be formatted. Object 'horizontally and vertically' can never fit within 'F_1'.". I also played with the layout by changing its size but the response had no change.
I am using Reports6i and the output format of the report is PDF. Is there a way to resolve the issue? Please share the solution if you have any for this.

Similar Messages

  • How to Convert the content in BLOB field into a PDF file...

    Hi,
    I am having PDF files stored in BLOB column of a table in Oracle Database (11G R2).
    I want to retrieve the files back and store them in hard disk. I am successful in storing the content as a file with '.doc' but if I store the file as '.pdf', adobe fails to open the file with error
    Adobe Reader could not open file 'xxx.pdf' because it is either not a supported file type or because the file has been damaged (for example it was sent as an email attachment and wasn't correctly decoded)
    I am using following example code to achieve my goal...
    Declare
    b blob;
    c clob;
    buffer VARCHAR2(32767);
    buffer_size CONSTANT BINARY_INTEGER := 32767;
    amount BINARY_INTEGER;
    offset NUMBER(38);
    file_handle UTL_FILE.FILE_TYPE;
    begin
    select blob_data into b from blobdata where id=1;
    c := blob2clob(b);
    file_handle := UTL_FILE.FOPEN('BLOB2FILE','my_file.pdf','w',buffer_size);
         amount := buffer_size;
         offset := 1;
         WHILE amount >= buffer_size
         LOOP
              DBMS_LOB.READ(c,amount,offset,buffer);
              -- buffer:=replace(buffer,chr(13),'');
              offset := offset + amount;
              UTL_FILE.PUT(file_handle,buffer);
              UTL_FILE.FFLUSH(file_handle);
         END LOOP;
         UTL_FILE.FCLOSE(file_handle);
    end;
    create or replace FUNCTION BLOB2CLOB ( p_blob IN BLOB ) RETURN CLOB
    -- typecasts BLOB to CLOB (binary conversion)
    IS
    || Purpose : To Convert a BLOB File to CLOB File
    || INPUT : BLOB File
    || OUTPUT : CLOB File
    || History: MB V5.0 24.09.2007 RCMS00318572 Initial version
    ln_file_check NUMBER;
    ln_file_size NUMBER;
    v_text_file CLOB;
    v_binary_file BLOB;
    v_dest_offset INTEGER := 1;
    v_src_offset INTEGER := 1;
    v_warning INTEGER;
    lv_data CLOB;
    ln_length NUMBER;
    csid VARCHAR2(100) := DBMS_LOB.DEFAULT_CSID;
    V_LANG_CONTEXT NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
    BEGIN
    DBMS_LOB.createtemporary (v_text_file, TRUE);
    SELECT dbms_lob.getlength(p_blob) INTO ln_file_size FROM DUAL;
    DBMS_LOB.converttoclob (v_text_file, p_blob, ln_file_size, v_dest_offset, v_src_offset, 0, v_lang_context, v_warning);
    SELECT dbms_lob.getlength(v_text_file) INTO ln_length FROM DUAL;
    RETURN v_text_file;
    END;

    user755667 wrote:
    Hi,
    I am having PDF files stored in BLOB column of a table in Oracle Database (11G R2).
    I want to retrieve the files back and store them in hard disk. I am successful in storing the content as a file with '.doc' but if I store the file as '.pdf', adobe fails to open the file with error
    Adobe Reader could not open file 'xxx.pdf' because it is either not a supported file type or because the file has been damaged (for example it was sent as an email attachment and wasn't correctly decoded)
    I am using following example code to achieve my goal...
    Declare
    b blob;
    c clob;
    buffer VARCHAR2(32767);
    buffer_size CONSTANT BINARY_INTEGER := 32767;
    amount BINARY_INTEGER;
    offset NUMBER(38);
    file_handle UTL_FILE.FILE_TYPE;
    begin
    select blob_data into b from blobdata where id=1;
    c := blob2clob(b);
    file_handle := UTL_FILE.FOPEN('BLOB2FILE','my_file.pdf','w',buffer_size);
         amount := buffer_size;
         offset := 1;
         WHILE amount >= buffer_size
         LOOP
              DBMS_LOB.READ(c,amount,offset,buffer);
              -- buffer:=replace(buffer,chr(13),'');
              offset := offset + amount;
              UTL_FILE.PUT(file_handle,buffer);
              UTL_FILE.FFLUSH(file_handle);
         END LOOP;
         UTL_FILE.FCLOSE(file_handle);
    end;
    create or replace FUNCTION BLOB2CLOB ( p_blob IN BLOB ) RETURN CLOB
    -- typecasts BLOB to CLOB (binary conversion)
    IS
    || Purpose : To Convert a BLOB File to CLOB File
    || INPUT : BLOB File
    || OUTPUT : CLOB File
    || History: MB V5.0 24.09.2007 RCMS00318572 Initial version
    ln_file_check NUMBER;
    ln_file_size NUMBER;
    v_text_file CLOB;
    v_binary_file BLOB;
    v_dest_offset INTEGER := 1;
    v_src_offset INTEGER := 1;
    v_warning INTEGER;
    lv_data CLOB;
    ln_length NUMBER;
    csid VARCHAR2(100) := DBMS_LOB.DEFAULT_CSID;
    V_LANG_CONTEXT NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
    BEGIN
    DBMS_LOB.createtemporary (v_text_file, TRUE);
    SELECT dbms_lob.getlength(p_blob) INTO ln_file_size FROM DUAL;
    DBMS_LOB.converttoclob (v_text_file, p_blob, ln_file_size, v_dest_offset, v_src_offset, 0, v_lang_context, v_warning);
    SELECT dbms_lob.getlength(v_text_file) INTO ln_length FROM DUAL;
    RETURN v_text_file;
    END;I skimmed this and stopped reading when i saw the BLOB to CLOB function.
    You can't convert binary data into character based data.
    So very likely this is your problem.

  • Read a Word/Excel doc and convert to PDF

    Can any one suggest a way or source to read a word/excel document and convert it to an PDF.. using Java
    Thanks,
    Satya

    Parse the Excel document with the Apache POI API and generate a PDF document with the Apache FOP API.

  • Read word/excel doc and convert to pdf

    Can any one suggest a way or source to read a word/excel document and convert it to an PDF.. using Java

    Parse the Excel document with the Apache POI API and generate a PDF document with the Apache FOP API.

  • Need to create link to Word Doc in blob column in search results report

    I got the Oracle Text boolean search of word documents in a blob column of a table working.
    Now I need to be able to create a link in the results report.
    I know that Oracle creates a link for each document in the column when you attach a file, I just need to know what the link should be to allow users to open the document in the search results report.
    Right now the application is set to do a search in the attached word documents, and in the results window it shows the names of the people who match the search, but it won't allow me to create a link to their resume in the results report.
    the name of the table is CONTRACTOR_LIST and the blob column is RESUME.
    How would you go about creating a simple link to the word file in the results window?
    Here is the code for the query
    select score(1) relevance, Name, Resume
    from contractor_list
    where CONTAINS (resume, :P1_SEARCH, 1) > 0
    order by 1 desc
    That works, but I can't get it to link to the resume file.
    Here is the code I'm using for the link
    javascript:popupURL(&quot;#RESUMEL#&quot;)
    This just give me an error page and the the link is
    http://server-namer:8080/apex/[datatype]
    the error is
    Bad Request
    The HTTP client sent a request that this server could not understand.
    Thanks again!
    Edited by: gjones77 on Dec 2, 2008 6:14 AM
    Edited by: gjones77 on Dec 2, 2008 7:08 AM

    It is within the table I believe (I'm not a DBA or a developer) since I created a BLOB column and then used the file browse feature to allow users to attach a resume to the table in order to be able to perform a search of the attached documents.
    I'm just having a hard time pointing the link in the search results report to the document in the blob column.
    The information on that page is great if you're trying to create a link to the document on the initial report.
    But I created a query using Oracle Text to run a report that does a boolean search of the attached word documents in the table.
    When it displays the search results, it doesn't create a link to the document and I can't figure out how to do it.
    Here's a link the the instructions I used to create the initial search report with Oracle Text, mind you I only created the index and query, I didn't add in all the link data since they're using documents on websites and I'm using documents in a table.
    http://www.oracle.com/technology/products/database/application_express/pdf/apex_text_application_v1.6.pdf
    If you can help me with this I'd really appreciate it.
    Thanks again.
    Greg
    Edited by: gjones77 on Dec 2, 2008 8:14 AM

  • New to PDF Portfolios - Need to Link between PDF, Word & Excel Docs

    Hello All,
         Thanks in advance for your help.  I'm new to the Adobe X Pro & making portfolios.  I have figured out how to create a portfolio.  My portfolio has a main pdf document and several folders with pdf, word & excel files in them.  What I’m trying to do is link from my main document (pdf file) to the other files (word, excel & pdf) that I’ve added to the portfolio.  I’ve tried linking to a pdf file and a thumbnail of the word doc (because I did find that I can’t link to the actual word or excel doc).  When I create & test the link (for both the pdf file & the thumbnail of the word doc) it is there; I can click the link I created and it will go to the word doc.  If I close the portfolio & reopen it the link to the pdf file is there, but the link to the word doc isn’t there anymore.  That link now goes to the main pdf file and not the word thumbnail or even the folder where the word doc is saved.  Any ideas on what to do?  Thanks.

    As Dave has noted you can not do this.
    Acrobat/Reader would need to know what program to use to read the data in the document and since there can be many different programs that could read your document,  Acrobat/Reader would need to know exactly which program to use on one's system. You might only have MS Office but others might have both MS Office and OpenOffice.org and might prefer to use OpenOffice.org unless there is a feature that is only available to MS Office. Yes it is possible to create a program that can be configured to use specific helper programs, but it can have a real impact on system efficiency. It is easy enough to download or extract the non-PDF document and then use your program of choice. Just look to MS Outlook for a program that can not always open an attachment, especially PDF files.

  • Displaying a word file stored as BLOB in the database

    Post Author: Sathish K Sekar
    CA Forum: WebIntelligence Reporting
    Hi,
    Is it possible for us to display a word file which is stored as a BLOB object in  our database.
    We are using BO XIR2.
    Thanks in advance
    Sathish

    Post Author: InfluentialSoftware
    CA Forum: WebIntelligence Reporting
    Sathish - is this query specific to wanting to display a Word file or does it relate to how to display any BLOB objects in the database via Infoview?Thanks,Andy 

  • How to upload a word/excel doc for z table and view ltr

    Hi to all,
    I have a requirement to upload word/excel or ppt files from pc, so that i can store them in table with some other values. These files will be used by number of users to view or download.
    Please guide me how to upload the files and store the file deatils in z table so that users can view the file later.
    I can get a static folder to store all document in app server.
    Thanks in advance,
    Sanjeev

    hi
    use <b>gui_upload</b> to upload execl , txt ot dat files
    into itab & then append them into ztables which u hav to create.
    i'm not sure of ppt files
    *sample code to upload a text document to app.server
    open dataset v_header for output in text mode encoding default.
        if sy-subrc <> 0.
          message i000 with 'ERROR OPENING FILE'.
        endif.
        loop at gt_changed_pohd.
          transfer gt_changed_pohd to v_header.
        endloop.
      close dataset v_header.
    ****sample gui_upload to upload tab seperated text file
    ***to upload dat files use the seperator '|' instead ****of 'X' in the foll.
    call function 'GUI_UPLOAD'
          exporting
            filename                      = v_file
           filetype                      = p_type
           has_field_separator           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
          tables
            data_tab                      = gt_data
         exceptions
           file_open_error               = 1
           file_read_error               = 2
           no_batch                      = 3
           gui_refuse_filetransfer       = 4
           invalid_type                  = 5
           no_authority                  = 6
           unknown_error                 = 7
           bad_data_format               = 8
           header_not_allowed            = 9
           separator_not_allowed         = 10
           header_too_long               = 11
           unknown_dp_error              = 12
           access_denied                 = 13
           dp_out_of_memory              = 14
           disk_full                     = 15
           dp_timeout                    = 16
           others                        = 17

  • Cannot Display Chinese Word if pdf preview for PLD layout.

    Hi,
    I am facing a problem when user pdf preview the pld layout with chinese word, the content will be blank, it will not be displayed. Print preview work fine for chinese wording.
    I had tried to change the font to every chinese character through the drop down list, but it still happen the same.
    I had check the pdf version, it can display chinese wording that not from SAP.
    I had search in the community, but none of them meet my requirement, as most of them happen in crystal report.
    Can anyone help? Anyone experience before?
    Another thing is, why in the General setting > path, there is no setup for pdf?
    Thanks

    Hi,
    Please refer SAP note for solution:
    1406074 - Chinese / Japanese Characters not exported to PDF
    Thanks & Regards,
    Nagarajan

  • Why is my mac (OS X Lion) logging me off and shutting down randomly? Also web browsers (safari, chrome and mozilla) and applications (word, excel) are shutting down and then have error reports? Please help!!

    My Mac (OS X Lion) keeps logging me off and shutting down randomly.. Also my web browsers (Chrome, Mozilla & Safari) keep quitting and so do my applications (word, excel).. Please help!

    My Mac (OS X Lion) keeps logging me off and shutting down randomly.. Also my web browsers (Chrome, Mozilla & Safari) keep quitting and so do my applications (word, excel).. Please help!

  • How to print a BLOB (image) on a PDF report using Oracle APEX Listener as Print Server

    Hi,
    I use APEX 4.2.
    I have the following query as SQL text for a Report Queries in Shared Components:
    select
        customer_id,
        cust_first_name,
        cust_last_name,
        cust_street_address1,
        cust_street_address2,
        cust_city,
        cust_state,
        cust_postal_code,
        phone_number1,
        phone_number2,
        credit_limit,
        cust_email,
        filename,
        company_profile,
        -- customer_image,
        decode(nvl(dbms_lob.getlength(customer_image),0),0,null,
        '<img style="border: 4px solid #CCC; -moz-border-radius: 4px; -webkit-border-radius: 4px;" '||
        'src="' ||
        apex_util.get_blob_file_src('P22_CUSTOMER_IMAGE', customer_id) ||
        '" height="75" width="75" alt="Photo Customer" title="Photo Customer" />') customer_image,
        mimetype,
        image_last_update
    from
        demo_customers;
    I am unable to have the image printed on the PDF report. Even when the P22_CUSTOMER_IMAGE is defined as session state item.
    Does someone knows how to print such image/BLOB in a PDF report?
    Thanks by advance.
    Kind Regards.

    Hi,
    Indeed, I would need a custom layout.
    Unfortunately, it seems (according to this white paper) not possible with the APEX listener only. I would need a third pary tool. A pity...
    For me strange, that I cannot generate such a report having images or pictures in a pre-definied report layout... Maybe a future enahancement for Oracle.
    Kind Regards.

  • Blob Image blows up  PDF Report

    Hi!
    Following problem: I select a report logo (size 33k) from the database in a blob field in the header section. When I create a PDF the report grows up enormously in size (10 times bigger than a report without logo) - I think the logo will be put in the pdf for every page. When I implement a static Image in the header section the report ist much smaller.
    How can I solve the problem?
    Bye,
    Rumburak

    Hello,
    Which version are you using ?
    If you use a version >= 9.0.4 , you can use the parameter OUTPUTIMAGEFORMAT.
    This parameter has an impact on the output size :
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/cmdline/common/cla_outputimageformat.htm
    Regards

  • Export to word/excel doc

    Is there any way I can export output of query from SQL*PLUS into word or an excel document ?
    Thanks.

    You could use spool
    spool /data.csv
    select * from table;
    spool off
    then import file into excel with spaces as the field delimiter.
    You could also use excel and setup an ODBC connection to you're database and query the data directly.
    Ian

  • Cannot make changes to Excel docs converted into Numbers

    When I open an Excel document in Numbers I can't make any changes or save despite all appearances of a proper conversion. I have current versions both of Numbers and Excel and have reinstalled both. Any ideas? thanks...

    Hello
    a - an update as well as a new install doesn't change the preferences files so if they are corrupted the problem will always be present.
    b- may you put the original XL doc and the result of the import in Numbers in a folder then make an archive of this folder (a zip one).
    Then attach the archive to a mail and send it to:
    koenig PERIOD yvan AT tele2 PERIOD fr
    I will be able to see
    a - if the locked feature strikes also on my machine
    b - if the import process done on my machine gives the same oddity
    c - if opening your XL doc in openOffice and/or neoOffice then importing in Numbers gives the same behaviour.
    Remember, I know what non-disclosure means.
    Yvan KOENIG (from FRANCE lundi 11 février 2008 20:29:34)

  • Display query's result (with many rows & field) into a list ?

    I'd like to display the result of a query wich returs many rows without using a list of values but another component which allowed the display of sereval columns at the same time.
    Note: I can't use a LOV because I don't want to return no value, and I need a TLIST presentation.
    null

    A kludgy solution would be to create a database view that combines the multiple columns into a single standardly formatted column, and use that for displaying in a jcombobox.
    Depends upon whether you like to code Java or like to play in the database. grin
    If you do that Java solution please post the code here!

Maybe you are looking for

  • How to determine which IP address and port is used to make DNS queries?

    I am using JNDI/DNS API to query a Enum server (Tel URI resolution in VOIP world) what is a DNS server. But I have many network interfaces, in a VLAN environment, and I must to specify from which interface (and port) all the requests are sent. When I

  • CVI fail to compile in release mode

    I am getting linker errors when I attempt to compile or build a project in the Release mode. In Debug mode the compile and build works fine. Any ideas? Dell E6410 OS = XP not using Release64 or Debug64 yet... ChipB Solved! Go to Solution. Attachments

  • Train-stop display-name property bug?

    Hi all, I'm using JDeveloper 11.1.1.4. When using train taskflow with fragments I noticed that when I enter Display name property on view (train stop) it doesn't appear as train stop title on page at all. When I enter Display name in property inspect

  • How to know onhand quantity at a selected date

    Hi, is there a concurrent ( or a PLSQL package ) which could give the onhand quantity of an item in storage at a given date . thanks.

  • Oracle Database on win 2003 server 64bits

    HI all which file in oracle download's page I can take for This operation system? Oracle Database 10g Release 2 (10.2.0.1.0) for Microsoft Windows (x64) or Oracle Database 10g Release 2 (10.2.0.4) for Microsoft Windows Vista x64 and Microsoft Windows