How to show pdf or word icons for a BLOB column in a report?

Hi,
I am getting interested for the blob columns, I have created some columns for storing some pdf drawings and pictures for specific items in a table, it is ok to show a text like 'download' or any other text in the report by setting the following blob attribute:
DOWNLOAD:TICKET_DETAILS:ATTACHMENT:TICKET_DETAILS_ID::MIME_TYPE:FILE_NAME:::inline:Download
but instead of texts, I would like to show a small pdf image for my Blob file, or a word image or Excel image, according to the different file type.
how to do that?
and instead of inline or attachment this two options, I would like when the user click the image of the file, the browser will show the image in a new window, or a new browser tab.
I tried the inline option for my file at Google Chrome, but when it showed the pdf file within the browser, I cannot get back to my app by clicking the 'backward' icon at the browser menu, it will stuck there and I have to close the broswer and then login to the app again, instead of simply returning back to the previous page within the app.
Please help me out.
Thanks
Peter Yawei . Zhang

Please try using a query like below for your report.
SELECT ticket_details_id,
CASE
   WHEN NVL(dbms_lob.getlength(attachment),0) = 0 THEN NULL
   ELSE
      CASE
         WHEN mime_type LIKE 'image%'
            THEN '<a href="'||apex_util.get_blob_file_src('P101_ATTACHMENT',ticket_details_id)||'" target="_blank"><img src="/i/image_icon.gif" /></a>'
         WHEN mime_type = 'application/pdf'
            THEN '<a href="'||apex_util.get_blob_file_src('P101_ATTACHMENT',ticket_details_id)||'" target="_blank"><img src="#IMAGE_PREFIX#menu/pdf_32.gif" /></a>'
         WHEN mime_type like '%ms-excel%'
            THEN '<a href="'||apex_util.get_blob_file_src('P101_ATTACHMENT',ticket_details_id)||'" target="_blank"><img src="/i/excel_icon.gif" /></a>'
         WHEN mime_type like '%msword%'
            THEN '<a href="'||apex_util.get_blob_file_src('P101_ATTACHMENT',ticket_details_id)||'" target="_blank"><img src="/i/word_icon.gif" /></a>'
         WHEN mime_type like '%ms-powerpoint%'
            THEN '<a href="'||apex_util.get_blob_file_src('P101_ATTACHMENT',ticket_details_id)||'" target="_blank"><img src="/i/powerpoint_icon.gif" /></a>'
         ELSE '<a href="'||apex_util.get_blob_file_src('P101_ATTACHMENT',ticket_details_id)||'" target="_blank"><img src="/i/office_icon.gif" /></a>'
      END
END attachment
FROM ticket_details
WHERE ticket_details_id = :P102_TICKET_DETAILS_IDPlease note that I am using APEX_UTIL.GET_BLOB_FILE_SRC function to download the BLOB files. The first parameter of this function in my example query is P101_ATTACHMENT, which refers to page item of type "File Browse" on page 101, which is a DML form on table TICKET_DETAILS. Replace it with the appropriate page number. Please refer to "Working With BLOBs Procedurally" section of this APEX 3.2 documentation for more: [url http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/advnc.htm#sthref2199]http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/advnc.htm#sthref2199
Also I have the gif images representing various MIME types on my file server. For e.g., /i/excel_icon.gif. You can use #WORKSPACE_IMAGES# if you want to.

Similar Messages

  • How to show the processing time taken for a BPEL process in BAM report.

    Hi All,
    I have the data as below in the Data object. I would like to show the time taken for each order to complete in the report.
    instance Id     order Id     product Name     product Code     price     status     instance Time      updaterName
    1360010     ord004     Guitar     prod003     2000     requested     9/22/2008 12:12:11 PM     Invoke_InsertSalesOrder
    1360010     ord004     Guitar     prod003     2000     Approved     9/22/2008 12:15:11 PM     Invoke_OrderStatusUpdate
    This data comes from simple BPEL process where sensors are configured at the start and end of BPEL process. Also have a human task activity in between to create the time difference.
    In Enterprise link design studio, I tried to calculate the time difference using expression calculator and store it as calculated field. But that doesn't seems to work because when I execute the plan, second sensor data reaches only after human approval whereas first sensor data would be waiting for calculation and ultimately nothing comes into data object.
    How and where the calculation be done to show the processing time in the report. Please someone throw some light on this.
    Regards
    Jude.
    Edited by: user600726 on Sep 30, 2008 1:30 AM

    I would suggest modifying your data object so that the data can all be in a single row and use the sensor at the end of the process to upsert (update) the row created by the sensor at the start of the process. The time difference between two fields in the same row is then an easy calculation on a BAM report -- No EL plan should be needed.

  • How do I create a desktop Icon for Adobe create pdf?

    How do I create a desktop icon for Adobe create pdf?

    Hi, ken.
    You can access ExportPDF from your computer more quickly in three ways:
    You can download and install the CreatePDF Desktop Application. More info is here. With this application, you can drag PDF files onto a desktop icon and have those converted to Office files. (If you subscribe to the CreatePDF service, this application will also allow you to create PDF files.)
    You can download and install the newest Adobe Reader and access the service using Reader's Tools Pane on right. Then, any time you have PDF open in Reader, you can (with a couple of clicks) convert that PDF to an Office file.
    You can drag the webpage icon from your browser to your desktop. This will create a shortcut to the ExportPDF website on your desktop. Here are some instructions for doing that using Internet Explorer or Firefox.
    Let us know if you have additional questions or issues.
    Dave

  • How to open pdf or word doc or notpad file in flex

    hai friends,
           how to open pdf or word doc or notpad file in flex. i am doing flexcoldfusion project. now i reterive data(notpad or worddoc or pdf file path) from database using coldfusion.now i want to open that file content .if i reterive notpad file .that will show in notpad. if it is possible. give example.
    regards,
    welcomecanv

    Hi WelcomeCan,
    Try this...
    var urlRequest:URLRequest = new URLRequest();
        urlRequest.url = "http://www.yourdomain.com/notepad.txt";
        //urlRequest.url = "http://www.yourdomain.com/FlexComp.pdf";
        navigateToURL(urlRequest,_blank);
    Thanks,
    Bhasker Chari

  • How do I remove expand / collapse icon for JTree empty folders

    Hi
    I am using a JTree as a file system browser. I use DefaultMutableTreeNode nodes.
    I have a problem with empty folders.
    Empty folders show the expand / collapse icon, leading the user to believe there are sub-directories. When the user double-clicks the folder, the expand / collapse icon goes away. This is a "haha-gotcha" glitch that I really don't want my users to have to continually deal with.
    So, how might I get my JTree to not show the expand / collapse icon for empty folders?
    Thanks
    Wayne

    Maybe I can use the FileSystemView isTraversable(File f) method in my TreeCellRenderer class to check if anything is in the directory.
    But I still need to know how to disable the expand / collapse icon for such a node.

  • How do I get the correct icons for Favorites?

    How do I get the correct icons for Favorites on my iPad? I am using iOS 7.  The icons show up correctly in my bookmarks in Safari on my iMac OS X (10.8.5).

    I don't think there is a way to get them. Why they show in the Bookmarks vs Favorites.

  • Can i convert pdf to word doc for free?

    With Adobe XI, it appears that i can convert a pdf to word doc for free, at least that is what the help page shows. However, when i try to convert the document i am led to a subscription page for this to function to be available. It's not expensive,but it is very misleading.

    There is a 30-day trial for Acrobat, but not sure it can convert to WORD (though I think it can). The full product can. However, be aware that conversion from PDF to DOCX varys depending on the way the PDF was created. If properly created, the conversion may be almost exact, but more commonly there format issues and such to deal with. There are also different conversion selections that give options to retain text flow versus layout. If you are looking for perfection, then don't be surprised when you don't get it.

  • How do I get the little icons for bookmarks to reappear in my pulldown menu?

    How do I get the little icons for bookmarks to reappear in my pull down menu? When I go to Bookmarks, and I go to Bookmarks Toolbar, the list of bookmarks used to have the little logos/icons associated with the company, etc. I liked these. When v9.0.1 updated, I lost these. Can they come back? Thanks for a great browser! Gene Newman, West Bloomfield, MI
    I use MacBook Pro, 2010, OSX 10.6.8 (Snow Leopard); Firefox version 9.0.1

    See also:
    *CheckPlaces: https://addons.mozilla.org/firefox/addon/checkplaces/
    *Bookmark Favicon Changer: https://addons.mozilla.org/firefox/addon/bookmark-favicon-changer/

  • Can you have a pdf as an icon for single click access on ipad or iphone?

    can you have a pdf as an icon for single click access on ipad or iphone?

    No - I think Safari is the only app that can have separate shortcuts (for different sites) on the homescreens. You can only access PDFs by first going into it's owning app.

  • Base64 to pdf. After conversion - how to show pdf file ?

    Hello all,
    I have to show and save a pdf file from internal table ion base64 format.
    I mean that I receive an internal table with data in base64 that represent a pdf file. I have
    to convert it into pdf file than show and save the file.
    I maked a conversion by:
      CALL METHOD utility->decode_base64
        EXPORTING
          encoded = encoded
        RECEIVING
          decoded = decoded.
    and, now my question is :
    What I have to do about the string decoded ? I have to append it somewhere ?
    and, how to create a pdf file from decoded string ?
    tks a lot.

    How to show PDF using SAPGui
    Please check my reply in the following thread

  • How to concert pdf to word doc

    ?help, how to convert pdf to word doc?

    Please look at the responses to your other post about this issue.
    There is no need to post multiple times.
    This is a User 2 User forum and we are not paid like Adobe Customer Service. Please respect the volunteering of the responders time.

  • How do i put the new icons for iworks on the toolbar

    how do i put the new icons for iworks on the toolbar

    I think you must mean the Dock (at the bottom of the screen typically).  You should be able to simply drag them from the Applications Folder to the Dock- same as anything else.
    I don't think they can be put in the Toolbar (which is on top of the screen).

  • How do I change the desktop Icon for an external hard drive?  I have gone to "Get Info" and tried dragging and dropping  several formats of pictures and the icon changes to the generic image of that file type.

    how can I change the desktop icon for an external hard drive.  Using LaCies and Dimple hard drives.

    One of the things I've found with OS X (at least with Snow Leopard, which is my first excursion into OS X), is that all too often the thumbnail displayed on a file, whether a file created or one downloaded, is a false thumbnail. That is, when you do a Get Info on the file the icon in the upper left is the generic icon for that file type, rather than the thumbnail displayed in Finder. Makes it a bit difficult to copy.
    Apparently Finder uses Preview in the background to generate the displayed thumbnail without actually creating one.
    What I've resorted to doing, particularly with graphic images, is to process them with GraphicConverter - I have its prefs set to automatially add thumbnails and previews. With an individual file this means opening it in GC and doing a Save As. However, a much easier and faster way is when there are two or more such files; I put them in a common folder and drop the folder onto GC. GC then opens them in a catalog view, in the process adding real thumbnails and previews to each automatically. Doesn't take long to do several hundred files that way.

  • Convertir PDF a WORD como?   How to convert PDF to Word?

    How to convert PDF to Word? please
    como convertir PDF a WORD? por favor

    To convert a PDF file to Word format, you can use Adobe ExportPDF.
    You cannot do this with Workspaces.

  • ADOBE DIGITAL EDITIONS: How do I delete a duplicate icon (for a book)

    Adobe digital editions -  how do i delete a duplicate icon (for a book)

    you will get the option to delete the icon only if its user installed. other wise you will have to sync using itunes on pc to remove apps.
    follow the link for syncing
    http://support.apple.com/kb/HT1386

Maybe you are looking for

  • BW Hierarchies sometimes not showing as pick list

    Hi, we have created a Crystal Report that uses a parameter that should be picked from a BW hierarchy (a cost center group). We created the report and published it via the BW publisher to BO and then included it with an iView in the BW Portal. Now whe

  • Various error mainly Err_300 or VC017 on website!

    Over the last couple of days seen I have loads of errors watching BTSport.com mainly Err_300 which I cant even find an explanation for? VC017 nearly fell out of my chair reading FAQ to check windows time settings, yep my time has always been set to M

  • Mail requesting password for 2 separate email accounts

    many times a day, please help. My settings and passwords are correct and have been fine until this week, now I'm getting asked on a minute to minute basis. Using Verizon DSL and GoDaddy, thanks!

  • Getting my music onto my new computer

    Very, very, very frustrated!!!  I've been trying for a week to get my music that is on my laptop, which is Windows Vista operating system, onto my new laptop, which is a HP, Windows 8.1 operating system.  I have signed up for sharing the home devices

  • Help me with a loaned Ipod

    My brother left his I pod here so my father in the hospital could listen to it. He said to charge it plug it in your computer. We I have a external port to do back-up so I don't need to go behind the computer. Well I have had it pluged in for 2 hors