How to customize blob column text displayed in a report

Hi All,
I have a table with column File_name (varchar2) and file_content (blob).
Report generated by the APEX allows me to show report with two different column
File Name || File Content
aaaa Download (link)
bbbb Download (link)
I would like to show the report in such a way the File name column is hyperlinked to download the blob content.
I tried to change the link using the BLOB format mask, but seems it only takes up text value and not column name as #FIELD_NAME#
Any idea how to achieve this ?
I am using Application Express 3.1.2.00.02
Thanks
bala
Edited by: Balamurugan Natarajan on Jun 3, 2009 2:16 AM

I got this online:
create or replace PROCEDURE  download_my_file_sp(p_file in number) AS
        v_mime  VARCHAR2(48);
        v_length  NUMBER;
        v_file_name VARCHAR2(2000);
        Lob_loc  BLOB;
BEGIN
-- Assuming your application's numeric ID is 100, set g_flow_id to
--     that value, otherwise change the value as required.
--***APEX_APPLICATION.G_FLOW_ID := 100;
--***IF NOT wwv_flow_custom_auth_std.is_session_valid then
    -- display this message or a custom message.
--***htp.p('Unauthorized access - file will not be retrieved.');
    -- You can do whatever else you need to here to log the
    --     unauthorized access attempt, get the requestor's
    --     IP address, send email, etc.
  --***  RETURN;
--***END IF;
        SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
                INTO v_mime,lob_loc,v_file_name,v_length
                FROM document_tb
                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_sp;Change the link of the PK: Page 3, Item 1: P3_ID, Value: #ID#
create a branch on a different page: Branch to PL/SQL Procedure, Onload Before Header, and Branch Action: download_my_file_sp(:P3_ID)

Similar Messages

  • How to increase 255 column limit in hyperion financial reporting studio

    how to increase 255 column limit in hyperion financial reporting studio

    Check this knowledge article :
    Best Practices for Hyperion Financial Reporting (FR) Report Design [ID 1196695.1]

  • How do I customize the tab text displayed on bookmarked sites?

    I often use "open all as tabs" for a bookmark folder of weather.com "5 day forecast" sites covering the towns in a geographical region where I plan to go hiking.
    One Firefox browser with six tabs for six towns in my state. "5 day forecast for Gorham," "5 day forecast for Jackson," "5 day forecast for Lincoln," etc.
    The problem is the tab displays only some of the first few words of the site description: "5 day forcas," "5 day forcas," "5 day forcas," etc.
    I'd like to display only the end of that sentence, which is the name of the town. This way I would have a list of towns across the top of the browser for direct reference.
    I changed the "name" property of each bookmark, but that only affects the name in the bookmark collection list, not the display name of a tab in use.

    1. With all due respect for your attempt to help; Of course it's part of the page source! That's a given.
    2. Again, with all due respect for you bothering; Letting me know that you don't think a thing is doable is not helpful, it's just chat.
    Thanks anyway, for your time.
    ~~~~
    My instinct is that of course there is something that could be done, it's a computer, every bit of it is adjustable.
    Some browser function grabs the title-tag text for display. It could just as well be redirected by a script (is that the right term?) to grab text held in a list in the bookmark for that page. Let's hear from someone on this idea, please.
    The point is, why have titles on tabs if it is junk information? Best use of the small tab text display area would be an abbreviation!

  • Blob Column to display Picture

    Hello,
    i have crated a table name Product , and i kept one column type Blob to upload pics for product. using wizard i created form with report.
    i can see the brows option on form but i can not see picture in report which is created durring wizard.
    how can i show the picture in report ? can anyone help me.
    Thanks,
    Suhaib

    Suhaib,
    <li> Check if the image function is fetching the images correctly by opening the image Location(fetched by the procedure) in a new browser tab
    It would be like, http//<your server>:<port>/<dad conf>/<schema>.<image fetch function>?<parameters >=
    In Andy's application this would be
    >http://apex.oracle.com/pls/otn/ATDSCHEMA.DISPLAY_IMAGE?inID=77
    <li> Check the report column's display type and change it to standard report column.

  • How to get LOV column's DISPLAY value in IR report?

    Hi,
    I would like to get LOV column's DISPLAY value to trigger another javascript function. Could you please provide any hint?
    For example, there is one IR report with 2 column, DEPT_NAME & SHOW.
    The DEPT_NAME type is LOV .
    The SHOW column is one link image, when clicking it , I would like to fire a javascript to get DEPT_NAME 's display value.
    I know I can use #DEPT_NAME# to get the return value of LOV. However, how to get current row's DEPT_NAME's display value?
    Thanks in advance.
    Ray
    Edited by: 最爱用中文 on 2013-4-11 下午4:14

    Is there any way you can create a table join, instead of using LOV as your display type?
    That way you can select the name of the department in your IR query, display it as text, and then easily reference it as #DEPARTMENT_NAME#, for example.

  • No column text displayed in alv when i use dynamic internal table

    Hi friends,
    when I use dynamic internal table to display the fields in ALV formant, field column text was not displaying ,
    total row of column text was blank.
    can u sujjest me in this...
    with regards,
    prasad.

    Hi
    That depends on how you've filled the catalog table, here u need to insert the description for the labels (short, medium and long) and the description for the layout variant management.
    So u make sure to fill the fields like
    SCRTEXT_L
    SCRTEXT_M
    SCRTEXT_S
    REPTEXT
    Max

  • How to read BLOB column from a table in SQL or PL/SQL

    I have table which is having one BLOB data type column . Ihave inserted few rows in that table . Now i want to see wheather BLOB column has been inserted properly or not . How to read that column through SQL or PL/SQL.
    Can anyone help me to do this.

    You can only manipulate LOBs in PL/SQL because you have to use the DBMS_LOB package.
    Check out the Oracle Developer's Guide

  • How to customize the Rich Text Editor task flow in the doc lib?

    Dear Experts in WCP forum,
    You know that webcenter portal has a feature is called customizing task flow.. so we have client request to customize the Rich Text Editor task flow of the Document library. Such as disable the Format, Font, Size drop down menu of the richtext editor UI.   But after I open the editHTML.jsff of the oracle.webcenter.doclib. the code is like this:
                        <f:facet name="richtext">
                               <af:panelGroupLayout layout="scroll" id="rtepng2">
                                  <rte:editor id="rte" value="#{pageFlowScope.rte.HTMLTextArea}" converter="#{pageFlowScope.rte.HTMLConverter}"/>
                                  <!-- keep region wrapped in the facet to be stretched-->
                                  <af:region value="#{bindings.linksResourcePicker.regionModel}" id="lpr"/>
                               </af:panelGroupLayout>
                            </f:facet>
    So likes that editor in fact is from <rte:editor tag.. my question is how to dig into this <rte:editor  to find its jsff code?  And change the menu inside to do the cusomization for them?
    Is that possible?
    A million thanks here in advance!
    wayne

    Based on the Tag TLD reference the editor tag has the following attributes:
    <tag>
        <description>An ADF Wrapper to use the CKeditor&gt;</description>
        <name>editor</name>
        <tag-class>oracle.webcenter.doclib.rte.internal.taglib.RteEditorTag</tag-class>
        <body-content>JSP</body-content>
        <attribute>
          <description>&lt;html&gt;the identifier for the component.  The identifier
    must follow a subset of the syntax allowed in HTML:
    &lt;ul&gt;
    &lt;li&gt;Must not be a zero-length String.&lt;/li&gt;
    &lt;li&gt;First character must be an ASCII letter (A-Za-z) or an underscore ('_').&lt;/li&gt;
    &lt;li&gt;Subsequent characters must be an ASCII letter or digit (A-Za-z0-9), an underscore ('_'), or a dash ('-').&lt;/li&gt;
    &lt;/ul&gt;&lt;/html&gt;</description>
          <name>id</name>
          <rtexprvalue>false</rtexprvalue>
        </attribute>
        <attribute>
          <description>The initial value of this component.</description>
          <name>value</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <deferred-value>
            <type>java.lang.String</type>
          </deferred-value>
        </attribute>
        <attribute>
          <description>a converter object</description>
          <name>converter</name>
          <deferred-value>
            <type>javax.faces.convert.Converter</type>
          </deferred-value>
        </attribute>
        <attribute>
          <description>
            this is a pass through to get/set the CKEditor ToolbarSet property
          </description>
          <name>toolbarSet</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <deferred-value>
            <type>java.lang.String</type>
          </deferred-value>
        </attribute>
        <attribute>
          <description>
            this is a pass through to get/set the CKEditor height property
          </description>
          <name>height</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <deferred-value>
            <type>java.lang.String</type>
          </deferred-value>
        </attribute>
        <attribute>
          <description>
            this is a pass through to get/set the CKEditor width property
          </description>
          <name>width</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <deferred-value>
            <type>java.lang.String</type>
          </deferred-value>
        </attribute>
      </tag>
    Which means that if you want to change the toolbar you have to check what is the type of toolbars the CKEditor uses, I can tell you that there are two defaults: Basic and Full and I believe the tag uses a custom toolbar called WC by default.
    So if you want to change the toolbar to only show basic, change the toolbarSet property to Basic to make the final result looks like <rte:editor id="rte" value="#{pageFlowScope.rte.HTMLTextArea}" converter="#{pageFlowScope.rte.HTMLConverter}" toolbarSet="Basic" />
    This is not tested, this is only a few insights I got reading about CKEditor

  • How to customize what new tabs display (Universal work list)

    Hello, Expert!!
    Please let me ask about subject.
    I made new tabs by customizing at "Universal Worklist Content Configuration", and then,
    I would like to customize what new tabs display.
    (Ex. Tab1 displays the document that subject name includes "Abc", or Tab2 displays the document that is sent within 5 days,, so on)
    Please could anyone let me know how to customize above!!
    Thanks
    /Yusuke

    Thanks,
    While trying that with the Tcode sm30 Iget the msg : The maintenance dialog for RSADMINA is incomplete or not defined
    How can I solve this ?
    Edited by: Youness NAJI on Jan 22, 2010 2:47 PM

  • How can a 2 column text frame be split into 2 separate text frames?

    Hi InDesigners,
    I have a 12 spread (22 page) document that was originally created with a single column primary text frame in CS6. It contains text and anchored images throughout the doc. (images are anchored to the text frame).
    My client now wants each page split into 2 columns, but the columns need to have different widths - the left column needs to be narrower than the right. Although I can create 2 columns in a single frame, it's not possible to adjust the column widths separately, so I need to get them into 2 separate frames.
    Is there a way to convert a 2 column text frame into 2 separate text frames, so I can resize the column widths invididually?
    kind regards,
    -c

    hi, Thanks for the replies,
    The doc size is 8.5"x11", with 1/2 " margins. I never mentioned anything about it being a book. (It's just a paper my client wrote and woud like a PDF of it). The reason for the uneven columns is he wants the images to be 4" wide. For some reason, he wasn't keen on just a single column with text wrapped around the pix. I proposed making a 3" left column threaded into a 4" right col with a .5" gutter between them and he wants it that way.
    Thank you both for your respones. I'll try the script
    -c

  • Customize Which Column to Display from UDT in UDF when Linked to UDT

    Problem:
    I have a UDF that links to a UDT. The problem is that when I select the UDF, it only displayes the columns from the UDT Code & Name. And for our purposes Code & Name are meaningless data points.
    Question:
    Can I choose which column is displayed from the UDT in the UDF?
    Please see the attached image. THANKS!

    Hi,
    This is SAP B1 standard behavior, But you can change name as terminal code. Other wise you can  detach the UDT from UDF and then assign one FMS in the UDF for serach terminal code instead of code and name.
    Hope this will work.
    Regards
    Sridharan

  • How to find orientation of  image displayed in a report region

    Hello,
    I have Apex 3.1 application showing an image in a report.
    The images are held as files on the web server and filename and description held in a database table
    I can use SQL to retrieve the data into report columns and then HTML expression to display the image as a fixed size as shown below. This works fine for landscape pictures but obviously distorts portrait ones.
    I wanted to check the orientation of the image and adjust width and height if portrait. I was considering using javascript to get image.height and image.width but am not sure how to reference the column and feed back into the HTML expression.
    Is this this the best approach and any help how to reference the column would be appreciated
    Many thanks
    Colin
    The Report Region Source is -
    select      "PHOTOFILE"."FNAME" as "FNAME" ,
    "PHOTOFILE"."ID" as "ID",
    "PHOTOFILE"."DESCRIPTION" as "DESCRIPTION",
    "PHOTOFILE"."FNAME" as "IMG2"
    from      "PHOTOFILE" "PHOTOFILE"
    where id=:P4_IMAGE_IDColumn Attributes IMG2
    Column Formatting
    HTML Expression
    <B><I><U><font face="verdana size="16"><center> #DESCRIPTION# </I></U>
    <font face="verdana size="20">&P4_DESCRIPTION.
    </B></center></font>
    <br/>
    <img src="#IMG2#" width=600 height=400  >

    This example may help you, although a bit different from what you want to achieve:
    http://apex.oracle.com/pls/otn/f?p=31517:212
    The point was:
    1. display image region should be fixed size (300px wide and 300px height)
    2. if the image size is bigger than that, the region should expand automaticaly.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How can I modify column width in a spreadsheet report without using an Excel template

    I currently use the LabVIEW Report Generation toolkit in LabVIEW 2011SP1 to create simple spreadsheet reports that I can build/print without having Microsoft Office products installed.  I really like being able to do this, and it allows me to generate nice on-demand data reports - I'm also not tied to having Office installed on the system I'm using, so this works on just about any test fixture I can install the software on.  
    I recently have a requirement that I must have variable-length columns in my report.  I currently use the VI "Append Text Table to Report" in order to create a text table, but the column width requirement is that all columns must be equal width UNLESS I use an Excel Template file to define my column widths.  
    My questions are:
    Is it possible to create a text table and define per-column widths without using an Excel Template?  If so, how?  My report mainly has a lot of small numerical values for the columns, but some columns contain system names or status messages - I really hate the longer text blocks wrapping and taking up so much real-estate when if I could control the column widths I can get all my data on a single line.
    I'll admit I haven't tried this myself yet, but if I use an Excel Template will that require me to have Excel installed on the PC in order to print/generate reports?
    Is there a recommended way (with an example) of generating a text table in a report with or without using the "Append Text Table to Report" VI that allows me to have custom column widths that doesn't require me to manually build a custom print page?  If I do have to create a custom print page, what would be the most straightforward approach?
    Thanks!
    -Danny

    Sure, I'll provide a pared down example that demonstrates my use-case:
    I have a control to the VI that takes in a 2D array of strings representing the data I want printed in a table.  I am generating a standard report, adding a table to the report, and printing it.  The first VI is "New Report.vi", the second VI is "Append Table to Report.vi", and the third is "Print Report.vi", all found standard in the Report Generation palette.
    Note that the "Append Table to Report.vi" has an input parameter "Column Width" with a default value of (1).  This input parameter is a single input parameter, which defines the column widths of ALL the columns in my table - hence, with the VI the way it is, all my columns will be 1 inch wide.  
    I find myself needing to be able to define per-column widths, not just a single global column width parameter.  
    The only way I have found to do this is by using an Excel template file.  The "New Report.vi" takes in a "template" parameter, and if used, the report generation toolkit can be set to ignore the "Column Width" input parameter on the "Append Table to Report.vi" by setting the width value to -1.  Instead it will launch Excel, open the template file provided, build the table using the template, will close Excel, and will attach the generated table to the report.  However, I have a strict requirement that Microsoft Office NOT be required to be installed on the computer.  
    So, without using Excel, is there a way to generate a table in a report and define the width of each column individually?
    -Danny

  • How can we split the grid display in alv reports.

    hi everyone.i am trying to get the display of two reports in a single one using split screens.i had written a report for vendor balance.one for open and one for cleared items.how can i combine these two reports.
    the field catalog was same for these two.
    can anyone suggest me suitable way to perform.

    HI,
           You can  also try ALV Blocked display.
    Pls Check following program
    BCALV_TEST_BLOCK_LIST.
    FM used are
    call function 'REUSE_ALV_BLOCK_LIST_INIT'
    exporting
    i_callback_program = sy-repid.
    call function 'REUSE_ALV_BLOCK_LIST_APPEND'
    exporting
    is_layout = it_layout
    it_fieldcat = fc
    i_tabname = 'IT_VBRK1'
    it_events = it_event
    tables
    t_outtab = it_vbrk1.
    call function 'REUSE_ALV_BLOCK_LIST_APPEND'
    exporting
    is_layout = it_layout
    it_fieldcat = fc1
    i_tabname = 'IT_VBRK2'
    it_events = it_event
    tables
    t_outtab = it_vbrk2.
    call function 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    form top_of_page1.
    format color col_positive.
    write: / 'FIRST BLOCK'.
    endform.

  • How to customize the error messages in web analysis reports

    Does anyone know how to customize the error messages that web analysis shows ,
    I want to customize the below error message with a custom error message
    "Document does not exist or no authorization to open document.Error occurred while loading document"
    Does anyone know how to do this ?

    Rajesh,
    you may want to check these links
    How to the Change the Application Stopped Message
    How to Change the Dispatcher Running, No Server Connected Message
    http://help.sap.com/saphelp_nw70/helpdata/en/65/18fc3f9ec4e669e10000000a155106/frameset.htm
    Thanks
    Bala Duvvuri

Maybe you are looking for