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/'| |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

Similar Messages

  • How to display the variable content in message?

    Hi anybody
    please let me know How to display the variable content in message?
    please send few lines of sample code to understand that
    thanks in advance

    Hi,
    Check out the link
    http://help.sap.com/saphelp_nw70/helpdata/en/2c/840b42202cce6ce10000000a155106/content.htm
    REPORT Y9020027 LINE-SIZE 130.    "Release 3.1G, 4.5A                  
    BREAK-POINT.
    MOVE: 'TESTREPORT for    "ASSIGN  FFeld+o(l)  TO  "        '     
            TO SY-TITLE.
          Declaration of variables    **********************
    FIELD-SYMBOLS <FS1>.
    DATA: FFELD8(8)   TYPE F VALUE '1022333'.   "Unusual: Explicit 8 bytes
    *DATA: ZFELD1(2)    TYPE N.            "Here slack bytes are (DW border)
                                         "necessary                      
                  "If you like computing error, please uncomment the above
    DATA: FFELDX(8)   TYPE F VALUE '7777777'.
    DATA: FFELDA(8)   TYPE F VALUE '7333213'.
    DATA: NFELDX(400) TYPE N.
    DATA: OFFX(4) TYPE I VALUE 160.
    DATA: LENX(4) TYPE I VALUE 8.
                  Main Section             *******************
        SKIP.
        WRITE: /5  'Example 1   **** inadmissible ASSIGN ***' COLOR 6.
        WRITE: /10 'Inadmissible ASSIGN: ''ASSIGN FFELD4+1(3) TO <FS1>'' '.
      ASSIGN FFELD4+1(3) TO <FS1>.
        ULINE.
        SKIP 2.
        SKIP.
    ASSIGN FFELD8+8(8) TO <FS1>.     "<-- Assigning of variable  FFELDX  !!
        BREAK-POINT.
        WRITE: / 'ASSIGN command with FFELD8, but FFELDX will be assigned'
                  COLOR 3.
        WRITE: /5 'Example 2'.
        PERFORM DISPLAY-FFELD USING FFELD8 'FFELD8'.
        WRITE: /10 'Content of   FFELDX      :', FFELDX.
        ULINE. SKIP 2.
        SKIP.
    ASSIGN FFELD8+16(8) TO <FS1>.    "<-- Assiging a few FFELDA to <FS1>  
        BREAK-POINT.
        WRITE: / 'ASSIGN with FFELD8, but instead FFELDA is assigned'
                  COLOR 3.
        WRITE: /5 'Example 3'.
        WRITE: /10 'Content of   FFELDA      :', FFELDA.
        PERFORM DISPLAY-FFELD USING FFELD8 'FFELD8'.
        WRITE: /10 'Content of   FFELDA      :', FFELDA.
        ULINE. SKIP 2.
    BREAK-POINT.
       DO 4 TIMES.
         ASSIGN FFELD8+OFFX(LENX) TO <FS1>.     "Zuordnung auf OFFX zu <FS1>
            WRITE: / 'ASSIGN command with FFELD8, es wird NFELDX zugeordnet'
                      COLOR 5.
             WRITE: /5 'Example 4', 'DO-Schleife Nr.:', SY-INDEX.
             PERFORM DISPLAY-FFELD USING FFELD8 'FFELD8'.
             WRITE: /10 'Content of NFELDX145(40)  :', NFELDX145(40).
             ULINE. SKIP 2.
             ADD 8 TO OFFX.
       ENDDO.
                   Subroutines             *******************
               Display of data fields and field symbols                  *
    FORM DISPLAY-FFELD USING FFELD FNAME.
    WRITE: /10 'Content of', FNAME, ':', FFELD.
    PERFORM FELDEIGENSCHAFTEN USING FFELD.
    WRITE: /10 'Content of <FS1> :', <FS1>.
    PERFORM FELDEIGENSCHAFTEN USING <FS1>.
    ADD   111    TO <FS1>.               "<-- Das Feldsybmol wird verwendet
    WRITE: /10 'ADD 111 TO <FS1>'.
    ULINE.
    WRITE: /10 'Content of', FNAME, 35 ':', FFELD.
    WRITE: /10 'Content of <FS1>',  35 ':', <FS1>.
    ENDFORM.
       Determination of field properties (only for information)          *
    FORM FELDEIGENSCHAFTEN USING ALLG.
    DATA: FLAENGE(2) TYPE N.
    DATA: FTYP(1) TYPE C.
    DATA: FOUT(2) TYPE N.
    DATA: FDEZ(2) TYPE N.
      ULINE.
      DESCRIBE FIELD ALLG LENGTH FLAENGE.
      WRITE: /10 'Field length  :', FLAENGE.
      DESCRIBE FIELD ALLG TYPE FTYP.
      WRITE: /10 'Field type    :', FTYP.
      DESCRIBE FIELD ALLG OUTPUT-LENGTH FOUT.
      WRITE: /10 'Output length :', FOUT.
      DESCRIBE FIELD ALLG DECIMALS FDEZ.
      WRITE: /10 'Decimals      :', FDEZ.
      SKIP 1.
    ENDFORM.
    END OF PROGRAM *************************************

  • How to display the same content in the two different main windows?

    Hi experts,
    How to display the same content in the two different main windows?
    Thanks in advance.
    sarath

    Hi
    Sorry but you can't have two main windows in sapscripts.
    Regards
    Gregory

  • How to display a BLOB column in ADF.

    How to display a BLOB column in ADF.

    hi agowlikar786
    Maybe the forum thread "ADF BC : download BLOB " can help
    at ADF BC : download BLOB
    regards
    Jan

  • How to build Table of Content in Crystal Reports

    Hi,
    Initially, I am looking for an article about how to build Table of Content in Crystal Reports in table-based approach----including how to write to DB table from report:
    http://support.businessobjects.com/library/kbase/articles/c2011950.asp
    However, the link above is invalid. I also searched through SDN articles, but no luck.
    Can someone please forward me the link if you happend to know?---does not have to link to this specific article, any working solution is just fine.
    I am aware of another approach which put the TOC to the end of the report(http://www.ml-consult.co.uk/cryst-05.htm), which probably does not satisfy the requirement.
    If you have other solutions, your share is greatly appreciated.
    Thanks a ton!

    [Is it possible to create a table of contents in Crystal Reports?|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313335333133303330%7D.do]

  • How to display username in RTF BI publisher report?

    Please advice how to display username in RTF BI publisher report?
    May be this can be done via hidden parameter of BIP report which default value will be set up with macro like {$username$} (or smth like)?
    Thanks in advance!

    Thanks. That worked. I was trying to get it as part of a multi-table query, aliasing dual. But that doesn't work in SQL Plus either so I guess I can't do that.
    I was trying
    select o.*, d.:xdo_user_name
    from oblix_audit_events o, dual d
    Before that I was trying
    select
    :xdo_user_name as USER_ID,
    :xdo_user_roles as USER_ROLES,
    :xdo_user_report_oracle_lang as REPORT_LANGUAGE,
    :xdo_user_report_locale as REPORT_LOCALE,
    :xdo_user_ui_oracle_lang as UI_LANGUAGE,
    :xdo_user_ui_locale as UI_LOCALE
    from dual
    but I must have fat fingered something because that works now too. Thanks.
    So if I need to do this in it's own query and I'm using an RTF template, how do I make that work?
    If I have to do it with it's own

  • How to display a message in an audit report?

    hello all,
    i would like to ask how do display a message in an audit report.  here is my code...
    CALL TRANSACTION tcode USING i_bdcdata
                            MODE c_n
                            MESSAGES INTO i_error2.
    IF sy-subrc EQ 0.
    ENDIF.
    CLEAR i_error2.
    LOOP AT i_error2.
      IF i_error2-msgtyp EQ c_e.
        MOVE v_pernr TO i_bdcerror2-pernr.
        MOVE c_infotype TO i_bdcerror2-infty.
        MOVE 'Error' TO i_bdcerror2-msgtype.
    <b>    SELECT SINGLE text
          INTO v_msgtxt
          FROM t100
          WHERE sprsl = i_error2-msgspra
          AND arbgb = i_error2-msgid
          AND msgnr = i_error2-msgnr.
        MOVE v_msgtxt TO i_bdcerror2-msgtxt.</b>
        APPEND i_bdcerror2.
      ENDIF.
    ENDLOOP.
    DESCRIBE TABLE i_bdcerror LINES v_bdcerrors.
    IF v_bdcerrors <> 0.
      SKIP 1.
      WRITE: 'BDC Error Report'.
      SKIP 1.
      WRITE: 'PERNR',
             'INFOTYPE',
             'MESSAGE TYPE',
             'MESSAGE TEXT'.
      ULINE.
      LOOP AT i_bdcerror.
        WRITE: / i_bdcerror-pernr,
               13 i_bdcerror-infty,
               22 i_bdcerror-msgtype,
               35 <b>i_bdcerror-msgtxt</b>.
      ENDLOOP.
    ENDIF.
    the message text that i was getting contains &1, &2 and so on.  how would i be able to replace it with the original value?
    thanks!
    -ann

    After calling the transaction, this is what I do.
    a) Call the function module, <b>MESSAGE_TEXT_BUILD</b> and pass the following values from <b>BDCMSGCOLL</b> or the internal table where you collect the messages.
       i) MSGID
      ii) MSGNR
    iii) MSGV1
      iv) MSGV2
       v) MSGV3
      vi) MSGV4
    There is no need to fetch data using select from table t100.
    It builds the message and returns in MESSAGE_TEXT_OUTPUT which can be then displayed to user.
    Regards,
    Subramanian V.

  • How to display a blob image in RTF template's Header.

    Hi,
    I want to display a blob image (logo company) in my RTF template,
    my problem is how i can display this image in the template's Header.
    I tried this
    <?
    <fo:instream-foreign-object content-type="image/jpeg" >
    <xsl:value-of select=".//LOGO"/>
    </fo:instream-foreign-object>
    ?>
    but was unsuccessful
    Thanks in advance.

    I tried this
    <?
    <fo:instream-foreign-object content-type="image/jpeg" >
    <xsl:value-of select=".//LOGO"/>
    </fo:instream-foreign-object>
    ?>
    but was unsuccessful
    sure
    what is red elements ?
    you template can be looks like
    ..... some data .....
    ( after  all data )
    <?template:footer_logo?>
    <fo:instream-foreign-object content-type="image/jpeg" ><xsl:value-of select=".//LOGO"/></fo:instream-foreign-object> (as field )
    <?end template?>
    <?call-template:footer_logo?> ( in header/footer )
    some remarks https://oralublog.wordpress.com/2014/10/04/bi-publisher-11g-footers-and-headers-in-rtf-template/

  • MAX: How to display icons (blob) in VB

    Hi!
    I've written a VB application which gets some information from MAX. It works very well, but I was wondering how to display the icons (stored as blob). Who can help me? Thank you in advance!!
    here is a piece of my code:
    Dim maxConf As mxConfiguration
    Dim maxItems As mxItems
    Dim maxItemAttribute As ImxItemAttribute
    Set maxConf = New MXCTRLLib.mxConfiguration
    maxConf.Initialize ("Local")
    Set maxItems = maxConf.EnumItems("CAT=Software,ALL")
    Set maxItemAttribute = maxItems.Item(ItemsListBox.ListIndex).EnumItemAttributes.Item(AttributesListBox.ListIndex)
    Select Case maxItemAttribute.AttributeType
    Case "Blob"
    'here, I want to display the icon and I need your help!
    Case Else
    ListBox1.AddItem (maxItemAttribute.AttributeValue)
    end select

    I will try this when I get back home - travelling at the moment.
    A bit more background....... I have a Function that is called to produce a yearly calendar view of rentals for a home, along with the rental prices - this has already been written using the as_pdf3 package, which can either physically create the report on the server (using utl_file), or it can return the blob direct.
    On the screen, the user can select the years that they wish to see in the report, push a button which will pass the parameters into the above said function, and then launch the "blob" in another window (as the blob is PDF format, it would launch the users PDF reader) - if the user then wants to save the report, they can do (using PDF reader) - this avoids me a) saving and housekeeping a file(s) on the server, b) I don't have to enable utl_file for the schema

  • How to Display IMAGE BLOB stored in a table in a html region APEX

    Need to know how to display an image stored in a table in a HTML APEX Region.
    Please

    Hi
    Please explain what you mean by it doesn't work?
    Are there errors messages, at what point, how far did you get and exactly what did you do????
    Please provide more information.
    Thanks
    Ben

  • How to display PDF BLOB file within Forms

    Hi All:
    I just want to know if is it possible to display PDF blob file within the forms. Currently I use webutil to open pdf in browser. This time I need to display it in forms, so that upon scrolling, the user can view the pdf images of that particular record.
    TIA

    Hello,
    <p>Did you see this Java Bean ?</p>
    Francois

  • I need to display my Blob image in my report (and also on form page)

    Scott,
    I followed the APEX advanced tutorial for uploading and downloading files. I have created a form on a table and that table contains a column of datatype BLOB. Now I want to be able to display the (Blob) images that I have uploaded.
    As I research the topic, I get the feeling that displaying the BLOB image can only be done in APEX 3.1 and up. Is this true? I have that version of APEX installed on my laptop and have successfully completed the "Defining and Viewing BLOB Data in Oracle Application Express 3.1" tutorial found here: http://www.oracle.com/technology/obe/apex/apex31nf/apex31blob.htm
    But I could not do it on the company server that runs APEX 3.0
    Even if I did get the approval to have the company APEX application upgraded to 3.1, there still is the issue of scaling the images so that they are not so large. I understand that there is a UTIL.APEX function "GET_BLOB_FILE_SRC" that would do this for me. I read the documentation at:
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/api.htm#CHDICGDA
    After reading it, I was still not clear as to how to use it correctly. Is there any documentation on how to implement this function in APEX?
    I did find something that I was hoping would help me. The article is entitled "Show Blob of other table in APEX Form" by Dimitri Gielis can be found here: http://dgielis.blogspot.com/2008/07/show-blob-of-other-table-in-apex-form.html
    I tried to import the file "blob_support.sql" application (on both APEX 3.0 and APEX 3.1 systems) but got errors. I'm not having very much luck here and would appreciate the help in pointing me in the correct direction.
    Help!!
    Thanks
    LEH

    Hello John,
    Your information was helpful. I can now see my images in my form.
    OK, now I would like to be able to call the image using a Region Source of type SQL instead of the HTML Expression. The reason for this is because I need to use logic to determine if the file is an image or not and to determine wether to show a thumbnail or just a link. I did find a "GET_BLOB_FILE_SRC" Function on the internet that suggests that I could do this but I need some help in making it work in my application.
    Here it is as a Region Source of type SQL:
    SELECT ID,
    NAME,
    CASE WHEN NVL(dbms_lob.getlength(document),0) = 0
    THEN NULL
    ELSE CASE WHEN attach_mimetype like 'image%'
    THEN '<img
    src="'||apex_util.get_blob_file_src('P4_DOCUMENT',id)||'" />'
    ELSE '<a
    href="'||apex_util.get_blob_file_src('P4_DOCUMENT',id)||'">Download</a>'
    end
    END new_img
    FROM TEST_WITH_BLOB
    If anyone can help me with this that would be appreciated.
    Thanks
    LEH

  • Displaying a blob image in a report and form

    Hello all,
    Can anyone help me. I have a deadline after two days and I want to fix this as soon as possible.
    I am using Application Express 4.1.1.00.23.
    My problem is in displaying an image retrieved from a table. In my table, I have created these fields to upload the image:
    "IMAGE" BLOB,
    "MIMETYPE" VARCHAR2(255),
    "FILENAME" VARCHAR2(400),
    "IMAGE_LAST_UPDATE" DATE,
    They were uploaded successfully. Then I created a report to select all attributes from table. The blob attribute was displayed as (unsupported data type).
    and when i link this report to a form the image appear as a link (<img src="apex_util.get_blob_file?a=50435;s=293574445128601&p=29&d=65102984724474793498>)
    I will be very grateful if anyone tell me how to display the image in the table and form.
    Thanks in advance,
    Sara

    >
    Please update your forum profile with a real handle instead of "941348".
    Hello all,
    Can anyone help me. I have a deadline after two days and I want to fix this as soon as possible.
    I am using Application Express 4.1.1.00.23.
    My problem is in displaying an image retrieved from a table. In my table, I have created these fields to upload the image:
    "IMAGE" BLOB,
    "MIMETYPE" VARCHAR2(255),
    "FILENAME" VARCHAR2(400),
    "IMAGE_LAST_UPDATE" DATE,
    They were uploaded successfully. Then I created a report to select all attributes from table. The blob attribute was displayed as (unsupported data type).
    and when i link this report to a form the image appear as a link (&lt;img src="apex_util.get_blob_file?a=50435;s=293574445128601&p=29&d=65102984724474793498&gt;)
    I will be very grateful if anyone tell me how to display the image in the table and form.
    See <a href="http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/advnc_blob.htm">+About BLOB Support in Forms and Reports+</a>.
    There's an <a href="http://apex.oracle.com/pls/apex/f?p=44785:24:2328375591211372::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:4100,2">OBE tutorial </a> 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 read text file content in portal application?

    Hi,
    How do we read text file content in portal application?
    Can anyone forward the code to do do?
    Regards,
    Anagha

    Check the code below. This help you to know how to read the text file content line by line. You can display as you require.
    IUser user = WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");
    IResourceContext resourceContext = new ResourceContext(user);
    String filePath = "/documents/....";
    RID rid = RID.getRID(filePath);
    IResource resource = ResourceFactory.getInstance().getResource(rid,resourceContext);
    InputStream inputStream = resource.getContent().getInputStream();
    BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
    String line = reader.readLine();
    while(line!=null) {
          line = reader.readLine();
         //You can append in string buffer to get file content as string object//
    Regards,
    Yoga

  • How to display Campaigns--- custom Object1-- Accounts in reports?

    Hi,
    We had requirement that needs to associate Accounts to campaigns, not contacts. I was able to do this using custom object 1 (since many accounts can be associated to many campaigns), having accounts as part of its related information.
    So the related information section of Campaigns is a list of custom obj 1s which, in turn, have multiple accounts associated to them.
    The question is how to display a list of campaigns and list of accounts associated to each campaign(i.e. the list of accounts associated to the custom objects associated to the campaign) in reports ?
    Regards,
    Ani.

    Ani,
    You'll need to use Combined reporting for this functionlity, if you search for this in the KB you should find some information on this or buy Mike Lairsons book from Amazon.com.
    Alternatively I used a report filtered by Account ID to show Campaigns targeted to that Account as a related item, this was standard Campaign/Contact/Account reporting. And all we did was add contacts to Campaigns.
    cheers
    alex

Maybe you are looking for

  • How to connect an non-hana-ewm with an Hana-ECC and vice versa

    Hello, for our migration project planning I am wondering how to connect EWM on SAP with ECC on Hana and vice versa. As it is, both systems are (productive) on non - hana with actual SAP-Release and have to be migrated. The background of my question:

  • Extremely Slow when Opening a new tab

    I have just bought my new Retina MacBook Pro after my 3 years Macbook Pro 13" is total lost and get the Mountain Lion OSX with latest 10.8.2 version After migrating the MacOSX from Snow Leopard to Mountain Lion, my Mac is everything ok but without Sa

  • How Do I remove DRM on epub?

    How Do i remove the DRM on ibooks, so i can read them on my pc. I purchased an ibook and i would like to read it, but i cant because of some ******** DRM. Whats the point of this? i purchased the book and i would like to read it on any device.

  • BIP desktop vs BIP enterprise edition.

    Hi, WHat is the difference between BIP Desktop and BIP Enterprise editon. I installed BIP Desktop first and coverted few Answers reports. I tried to sftp the report and was not successfull. I contacted oracle support and was informed that I need to i

  • Errors for PACKAGE BODY WWV_FLOW_CUSTOM_AUTH_SSO

    Hi All, Running the below package so I can configure SSO...running into the below error. Any help is appreciated SQL> @custom_auth_sso_902.plb; ...wwv_flow_custom_auth_sso Warning: Package Body created with compilation errors. Errors for PACKAGE BODY