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

Similar Messages

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

  • OK, I need to be able to have a linked TOC, and also have destinations created in FM10 that will not be lost when I 1. Save the book as a PDF. then 2.  need the PDF to be as small as possible, but without losing my destinations. Anyone know how to do that

    OK, I need to be able to have a linked TOC, and also have destinations created in FM10 that will not be lost when I 1. Save the book as a PDF; then 2. I need the PDF to be as small as possible, but without losing my destinations. Anyone know how to do that??
    I had been saving as a PDF and then reducing the size of the PDF by printing it as a PDF with a degree of image compression. I write manuals with a LOT of screen captures and line art that needs to be clear. So it is a balancing act between image clarity and PDF size. The PDFs on the web need to be smaller - sure you can undertsand.
    Anyway, when I print the PDF again, I lose both my destinations and bookmarks.
    Anyone know of any way to avoid that?

    Control the images by creating a custom PDF Job Options and then selecting it in the PDF Job Options drop-down of the PDF setup dialog box (File > Save as PDF...)
    Create the custom PDF Job Options file with Distiller. If you do not have Distiller, open the Printing Preferences of the Adobe PDF printer. Start with the Smallest File Size Job Options settings and Edit.

  • How to make a PDF embedded image append a report and send via fax electronically from MS SSRS 2012?

    How can I make a PDF embedded image append a SSRS 2012 report and send via fax all electronically?  Is this possible?
    Thanks in advance for your time!

    Hello,
    1. The report item Image can be used to display the image which  embedded in the report, stored in a database, stored on the report server, or stored elsewhere on the Web.
    For example, you can embedded the PDF image in the report and stored as text in the report definition.
    2.Reporting Services includes an e-mail delivery extension and a file share delivery extension which you can send report to user or group through e-mail or send the report to a shared location on your network.
    If you want to send the report to FAX, you may try to create a custom delivery extension depend on your faxing software.
    Reference:Implementing a Delivery Extension
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • How to display a BLOB (Image) in a EBS Report?

    User requested to add a Logo image to a report which is called from E-Business Suite (EBS).
    The image is currently stores in a BLOB column.
    How can I make the image to display on the report?
    Thanks!

    I was trying to use the BLOB and display the image in a report.
    Per your suggestion:
    "Select the column in your query.
    Create an item in the layout editor and set the source to this column.
    Set File Format to Image."
    My question was I dont know how to "set the source to this column" as you described above.
    So, to work around it, I moved the image file phyically to the UNIX file system.
    Then, created an item in the layout editor which required a valid "image file path" the property palette.
    Since, the report was created under windows, it did not validate with UNIX file path.
    That's why i need to perform extra steps to get the file path correct to work in UNIX.
    EDIT:
    I guess when you said "set the source to this column", you mean to map the "Field source" attribute in the property palette to the database column from query.
    But depends on what item you want me to create (I created a "Link File" item) and it does not have the "Field source" attribute available to map to a database column.
    Edited by: user595907 on Sep 21, 2009 9:47 AM
    Edited by: user595907 on Sep 21, 2009 9:54 AM

  • 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

  • Need help on filtering out one record from a report and open in new page

    Hi I am new and embarrassed to write in the forum asking silly questions. Thing is I am learning all from scratch without help from anyone. I have created a database (have previous knowledge only from Access) and have managed to create a beautiful report from a search filter. This report lines up several records matching what I needed. Now, I want to make the whole report with hyperlinks to a detailed page on each of the records in the report. I have tried using the feature where one can make one column hyperlinked and redirect to a new page, where I am getting all the records again - instead of only getting the record I am clicking on. I have looked and looked in the forums without finding solution and I have tested and tried various methods without luck. I am suspecting that I need some sort of knowledge on how to write a select query with where conditions that can apply to filtering out a record from one report to get another detailed on only one object (i.e. record). :/ Stupid or what?

    Hrefna.
    What you need to look into is two things:
    1) The link you defined, needs to set additional attributes for the target page. In the "Column Link" box, you have set the link to "Page in this Application" and followed by the page number (let's say, Page 10). Below that, you should set an Item to an item on you target page (let's call that P10_PRODUCT_ID). This item should be the primary key of your detail table (on the targe page). You can select this item from the popup list. The Value of the item should be picked from a popup list as well, being the value from the record you clicked on. This should then transfer your selected item to your page. The URL will then have something like P10_PRODUCT_ID:5 at the end.
    2) On the target page, 10, you must change the query slightly, so that it adds a WHERE clause:
    WHERE PRODUCT_ID = :P10_PRODUCT_ID
    Now, you should be set.
    Hope this helps.
    Borkur

  • Displaying a BLOB image inside a CFGRID

    Is there a way to display an image stored as a BLOB inside my DB in a bound CFGRID (HTML formatted)?  My grid is bound to a cfc function that returns ten rows at a time. I had originally returned an img tag to my image column to display the photos, but I'm trying to migrate from storing images on the server file system to storing them as BLOBs in my DB.  I can retrieve the BLOB without any problems, but how do I return images to my CFGRID?  I really don't want to have to write them to the file system to do this as it would be counter productive.

    Hi, i got a trouble to display the image in BLOB
    i have win2k3, oracle 10.2 g, php 5Which version of PHP 5? Some LOB handling got broken and fixed along the way.
    Try the latest DLL from http://pecl4win.php.net/ext.php/php_oci8.dll
    -- cj

  • Displaying a BLOB image

    Hi, i got a trouble to display the image in BLOB
    i have win2k3, oracle 10.2 g, php 5
    when i upload the image, the browser send this:
    Error CGI
    La aplicación CGI especificada puede comportarse de forma anormal si no recibe un conjunto completo de encabezados HTTP.
    i'l agree your help,
    the code is:
    <?php
    // Sample form to upload and insert an image into an ORACLE BLOB
    // column using PHP5's OCI8 API.
    // Before running this script, execute these statements in SQL*Plus:
    // drop table btab;
    // create table btab (blobid number, blobdata blob);
    // This example uploads an JPG file and inserts it into a BLOB
    // column. The image is retrieved back from the column and displayed.
    // Make sure there is no whitespace before "<?php" else the wrong HTTP
    // header will be sent and the image won't display properly.
    // Based on a sample originally found in
    // http://www.php.net/manual/en/function.ocinewdescriptor.php
    $myblobid = 1; // should really be a unique id e.g. a sequence number
    define("ORA_CON_UN", "username"); // username
    define("ORA_CON_PW", "passwd"); // password
    define("ORA_CON_DB", "connstring"); // connection string
    if (!isset($_FILES['lob_upload'])) {
    ?>
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"
    enctype="multipart/form-data">
    Image filename: <input type="file" name="lob_upload">
    <input type="submit" value="Upload">
    </form>
    <?php
    else {
    $conn = oci_connect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB);
    // Delete any existing BLOB so the query at the bottom
    // displays the new data
    $query = 'DELETE FROM BTAB WHERE BLOBID = :MYBLOBID';
    $stmt = oci_parse ($conn, $query);
    oci_bind_by_name($stmt, ':MYBLOBID', $myblobid);
    $e = oci_execute($stmt, OCI_COMMIT_ON_SUCCESS);
    if (!$e) {
    die;
    oci_free_statement($stmt);
    // Insert the BLOB from PHP's tempory upload area
    $lob = oci_new_descriptor($conn, OCI_D_LOB);
    $stmt = oci_parse($conn, 'INSERT INTO BTAB (BLOBID, BLOBDATA) '
    .'VALUES(:MYBLOBID, EMPTY_BLOB()) RETURNING BLOBDATA INTO :BLOBDATA');
    oci_bind_by_name($stmt, ':MYBLOBID', $myblobid);
    oci_bind_by_name($stmt, ':BLOBDATA', $lob, -1, OCI_B_BLOB);
    oci_execute($stmt, OCI_DEFAULT);
    // The function $lob->savefile(...) reads from the uploaded file.
    // If the data was already in a PHP variable $myv, the
    // $lob->save($myv) function could be used instead.
    if ($lob->savefile($_FILES['lob_upload']['tmp_name'])) {
    oci_commit($conn);
    else {
    echo "Couldn't upload Blob\n";
    $lob->free();
    oci_free_statement($stmt);
    // Now query the uploaded BLOB and display it
    $query = 'SELECT BLOBDATA FROM BTAB WHERE BLOBID = :MYBLOBID';
    $stmt = oci_parse ($conn, $query);
    oci_bind_by_name($stmt, ':MYBLOBID', $myblobid);
    oci_execute($stmt, OCI_DEFAULT);
    $arr = oci_fetch_assoc($stmt);
    $result = $arr['BLOBDATA']->load();
    // If any text (or whitespace!) is printed before this header is sent,
    // the text won't be displayed and the image won't display properly.
    // Comment out this line to see the text and debug such a problem.
    header("Content-type: image/jpeg");
    echo $result;
    oci_free_statement($stmt);
    oci_close($conn); // log off
    ?>

    Hi, i got a trouble to display the image in BLOB
    i have win2k3, oracle 10.2 g, php 5Which version of PHP 5? Some LOB handling got broken and fixed along the way.
    Try the latest DLL from http://pecl4win.php.net/ext.php/php_oci8.dll
    -- cj

  • Oracle lite application not showing blob images in BI reports

    Hi,
    We have an application running in Oracle lite, we integrated the BI publisher reports (PDF reports are generated Using Data template and RTF file with Java API for BI publisher) with the application. Its been working fine for a long time.
    Now we are showing some images on the pdf report, the images are stored in the Oracle lite database as blobs. My application fails when translating the Data template to xml data. I am not getting any exception other than out of memory error after a while.
    anybody had the same problem? Let me know if you need more information on this problem.
    Any help will be great!!
    Regards,
    Parthiban Kumar
    Edited by: Parthiban Kumar on Nov 12, 2009 10:45 AM

    Hi Carsten
    That was exactly* I was looking for. Maybe I should Google more in German ;-)
    The main problem was that I defined my image outside the first repeating group (that doesn't repeat, it's always just one object) - the first group is followed by 7 more.
    Just like the "Name" (that's positioned outside the group in the document header), I positioned the image above the table representing the group.
    Doing that, the "Name" is filled correctly, the Image only when the Output Format is Excel or HTML - not Word or PDF ... makes no sense but that's tje way it is.
    After moving the image inside the group....it works great!
    (One more thing...the image size is fixed to the image you use as "dummy". Is there any way to make that more flexible, because now some scaling happens...)???
    @Trent: That was the way we initially did it, but when the size of the row exceeds 32K...you know what happens.. And even with a small image the 32K limit is hit easily
    The way I use it now (very similar to Carsten's description) there is no limit....
    Thank you all!
    Roel

  • Table of content, I want to display just the image for each chapter and the name of the chapter. my book is not landscape format but each time I draging a picture into a specific chapter it duplicate it to all chapters why?

    table of content in a landscape orientation.
    I want to have in my table of content only image and the name of the chapter which is each to do.
    my problem when I am draging an image to each chapter it copied it to all chapter although I am marking only the specifc chapter.
    why? how can i overcome it?

    Are you using Microsoft word?  Microsoft thinks the users are idiots. They put up a lot of pointless messages that annoy & worry users.  I have seen this message from Microsoft word.  It's annoying.
    As BDaqua points out...
    When you copy information via edit > copy,  command + c, edit > cut, or command +x, you place the information on the clipboard. When you paste information, edit > paste or command + v, you copy information from the clipboard to your data file.
    If you edit > cut or command + x and you do not paste the information and you quite Word, you could be loosing information.  Microsoft is very worried about this. When you quite Word, Microsoft checks if there is information on the clipboard & if so, Microsoft puts out this message.
    You should be saving your work more than once a day. I'd save every 5 minutes.  command + s does a save.
    Robert

  • Need to display variable descriptive text in a report

    Does anyone know of a way to display the descriptive text for user entry variables in Crystal Reports? I've tried a couple of methods in the past (a subreport going against master data and building an array of text valued from the data) but each has method has some significant drawbacks. How are customers dealing with this right now? I have been encouraging them to be satisfied with the technical names, but that doesn't go over very well.

    Look like no one had any thoughts. I'll just close this one down for now.

  • Limit the filesize upload and resize a blob image in a report

    I'd like to know how to do both.. I have a file browse that uploads images to my application. It's called P34_IMG1. I would like to limit the file dimensions to a maximum of 200 x 300 px (but it can be less) and have a limit of 1MB in filesize.
    As well as the above, I'd like to know how to resize this image into a 'thumbnail' of sorts that shows the image much smaller in a report. The image shows but they are too big. How do I resize them?
    Thanks much
    -J

    oh I didn't see this reply, Tony. Sorry.
    No I don't have the image like that in the report, the report's query is like this:
    select * from (
    select      "LOTS"."LOTID" as "LOTID",
          "LOTS"."LOTNAME" as "LOTNAME",
          "LOTS"."ADD1" as "ADD1",
          "LOTS"."ADD2" as "ADD2",
          "LOTS"."ADD3" as "ADD3",
          "LOTS"."COUNTRY" as "COUNTRY",
          "LOTS"."MESSAGE" as "MESSAGE",
          "LOTS"."APPSTATUS" as "APPSTATUS",
          "LOTS"."SENDERMESSAGE" as "SENDERMESSAGE",
          "USERS"."USERNAME" as "USERNAME",
             dbms_lob.getlength("IMG1") as "IMG1"
    from      "USERS" "USERS",
          "LOTS" "LOTS"
    where   "LOTS"."USERID"="USERS"."USERID" AND (UPPER("USERS"."USERNAME") = UPPER (:APP_USER)))
    where (
    instr(upper("APPSTATUS"),upper(nvl(:P40_SEARCH,"APPSTATUS"))) > 0
    )and the IMG1 column in the report attributes has the number/date format as IMAGE:LOTS:IMG1:LOTID::::::inline:Download. So I don't know how to use this to resize the images, unfortunately.

  • I am considering buying a MBA but i need to do word processing, making power point presentations, and also to use publisher for work, does the MBA have the ability to do these things, if so will I be able to continue with work done on a MBA with a PC?

    I am considering buying a mac book air and I was wondering if I can still do word processing, make powerpoint presentations and use publisher like i would on a PC? Also if I can then would I be able to continue with work done on the mac book on a PC and all the computers at school are not macs ? 

    I am using the 11" MBA with Office 2011 (with latest updates).  The form factor is great for travel.
    Powerpoint presentations work well, but there are some issues with creating a presentation under OSX then continuing editing under Windows (Powerpoint 2010).  I've experienced problems with custom backgrounds not rendering correctly while editing slides under Windows when the original presentation was created under OSX.  If you stick with the "standard" themes I imagine you'll be OK.
    Also, there is a major drawback in that there is no IR port on the new MBA(s).  Therefore, you cannot use an Apple Remote to control a slide show.  Yes, there is an app for the iPhone that can control a Keynote slide presentation using Bluetooth, but since I haven't tried it, I cannot say if that app will work for Mac Powerpoint 2011.
    What is really needed is an "Apple Bluetooth Remote".  (please, if anyone from Apple is listening...)
    Your only option to run Publisher is to run Windows in a virtual machine (e.g. Fusion or Parallels) with Publisher installed as there is no Mac version.
    I run Fusion with Windows Server 2008 R2 x64 configured as a workstation and Office 2010 as my main travel machine and it is very responsive.  Even using Windows Aero Theme which is knowned to be graphics intensive.

Maybe you are looking for