Download column link to SQL report

Hi ,
I am using apex 4.1.
I have a SQL report  with blob image column also . And along with the image i need to add download link as a column can some one please suggest me how to do it.
Thanks
Raghav

raghav1212 wrote:
I am using apex 4.1.
I have a SQL report  with blob image column also . And along with the image i need to add download link as a column can some one please suggest me how to do it.
This is very simple. Reference the image column twice in the report query projection, and apply a download format mask to one column and an image mask to the other.

Similar Messages

  • Conditional display of a column link in sql updateable report

    Hi There,
    I've attempted to look thru the Apex forum about using an Authorization Scheme in an SQL Query (Updateble Report) where I can conditionaly enable (display) a column link based upon a value in the report but alas I cannot find a solution.
    What I have is a SQL Query (updateable report). What I want to achieve is dependant on the value of one of the columns in the report query conditionaly display a column link for the row being displayed. For example if the report dispayed the data from emp, dept only display a column link for rows where the deptno = 100 otherwise don't display the column link. Is this possible to achieve?
    I've tried to define in the authorizatuon scheme in the where clause of an SQL Statement to reference the report column as #deptno# but this doesn't work.
    TIA

    Boketi,
    I was unsuccessful yesterday in demoing what I believe you want to achieve. It appears that an authorization scheme will not process row by row within a standard report so as to allow a conditional display of a link or any other column attribute. You can conditionally display a column by the use of a page item but this method appears to be all or nothing.
    I was successful when I coded the return of the empno via a Case statement but the Link still appeared even though there was no value (empno) to link with. So essence the link to you to a blank for with no PK to read the database by.
    SELECT CASE WHEN deptno = 10 THEN empno ELSE NULL END empno,
           ename,
           job,
           hiredate,
           sal,
           comm,
           deptno,
           phone_nbr
    FROM   empJeff

  • Column name in link on sql report?

    Hey guys -
    Is there some way to put the column name of a report in a link?
    When you define a link on a column you have the ability to use a substition string for the VALUE of a particular column... but I want to somehow pass the string value of the column.... anyone know how to do this?
    Thanks

    Not the value of the column.. I want the actual column name...
    i.e.
    Items on page to set:
    txtbox1
    txtbox2
    Query:
    Channel          INS1     INS2     INS3     INS4
    Retail          13     1     333     55
    Wholesale     4234     23     1     44Okay, so I want to make a link on the values in the query (the #'s) to set the values of the txtboxes...
    example would be if I click on 333 I want it to set txtbox1="Retail" and txtbox2="INS3"
    The channel one is fine I just use the substition string of #COL1# in the link and it replaces the value... but nothing that I can find on how ot set txtbox2="INS3"
    Edited by: nferreri on May 15, 2009 9:51 AM

  • Add Image column in classic sql report to open a pop page

    I have sql report I want to add a new column which will have image to click, Once user clicks the image a popup page should open.

    Hi Vikram,
    Sorry to bother you, I am very new to apex. Here is my sql query for sql report. Can you please help me.
    <xmp>select
    case
    when ISUPPORT_NUMBER is null or ISUPPORT_NUMBER = 'N/A' then '<a href="javascript:myFunc3(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">Enter SR Number</p></a>'
    else '<span style="background-color:red;font-weight:bold">'
    || ISUPPORT_NUMBER
    || '</span>'
    end ISUPPORT_NUMBER,
    case
    when ISUPPORT_NUMBER is not null and ISUPPORT_NUMBER != 'N/A' then '<a href="javascript:myFunc4(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#FF0000;font-size:14px;">'|| MACHINE_NAME ||'</p></a>'
    else '<a href="javascript:myFunc4(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:14px;">'|| MACHINE_NAME ||'</p></a>'
    end MACHINE_NAME,
    FUNCTION,
    VERSION,
    VENDOR_CLUSTER,
    case when used_by is null then '<a href="javascript:myFunc2(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">Avaliable</p></a>'
    when upper(used_by)=v('APP_USER') then '<a href="javascript:myFunc5(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:blue;font-size:12px;">' || used_by || '</p></a>'
    else used_by
    end used_by,
    case
    when loaned_to is null and ( upper(used_by)=v('APP_USER') or used_by is null) then '<a href="javascript:myFunc(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">Avaliable</p></a>'
    when upper(used_by)=v('APP_USER') then '<a href="javascript:myFunc6(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:blue;font-size:12px;">' || loaned_to || '</p></a>'
    else loaned_to
    end loaned_to,
    LOANED_TO_EXPIRY_DATE,
    LOAN_INFO,
    decode(SCAN_NAME,null,'<a href="javascript:myFunc3(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">More Details</p></a>','<a href="javascript:myFunc3(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">More Details</p></a>') SCAN_NAME,
    USERNAME,
    VNC_PASSWORD,
    LAST_UPDATED_BY , </xmp>
    <b>Here I want to add a image column where I can give a link like above to open popup </b>
    from install_dbqa_machines
    Edited by: Sivaramaraju on Jun 19, 2012 9:06 AM
    Edited by: Sivaramaraju on Jun 19, 2012 9:07 AM
    Edited by: Sivaramaraju on Jun 19, 2012 9:08 AM

  • No data found when adding column link to classic report

    Hi,
    Oracle 11g r2, APEX 4.1.1.00.23.
    I have some classic reports.
    I go to Report Attributes, then I click Add Column Link in the "Tasks" right menu, it adds me a column link, I just add some text for the link and a page to go to.
    Then I run the report and I get :
    report error:
    ORA-01403: no data foundTested with several classic reports on multiple pages.
    Debug mode shows me :
    0.43816     0.00240     ...Execute Statement: select distinct [...] order by 3,11 ,4
    0.44056     0.00162     print column headings
    0.44218     0.04816     rows loop: 25 row(s)
    0.49037     0.00141     report error: ORA-01403: aucune donnée trouvée
    0.49175     0.00078     Computation point: After Box BodyWhen I run the query in my favorite tool, I get expected results.
    Did I missed something ?
    Thank you.
    Yann.

    Yann39 wrote:
    <font size="4">Is it an APEX bug ?</font>
    - Create a new Region of type Classic Report, then set Region source as :
    begin
    return test_return_query;
    end;- Run the page, the report works as expected
    - Go to Report Attributes and click Add Column Link (and just specify a text for the link and a page to go to).
    - Run the page, you should get the error !This might be unorthodox but try wrapping your returned query within an SQL statement, like so:
       begin
          return 'SELECT t.* FROM ('||test_return_query||') t';
       end;
    I can reproduce it on oracle.apex.com if needed...If my suggestion doesn't work, I think this might be the only option. You could create a new forum posting with the word "BUG" in the title, along with a link to this thread and the relevant workspace details (with guest developer credentials).

  • Execute a DML process after user selects a column link in a report

    APEX 3.2 / RDBMS 10GR2
    I have written a non IRR report that displays several rows of data. The first column of each row has a defined column link uniquely identifying the row. When a user selects one of the rows via the column link, a "hi fidelity" report is generated for that displayed row using a (RTF) report layout created in the shared components section of APEX.
    This is working well but I also need to execute a DML process after the user selects a row but prior to displaying the hi fidelity report using the selected column link value of the displayed row.
    As a URL is used to call hi fidelity report via the column link, it does not appear that the process section of the APEX page component is available to execute the DML prior to displaying the report.
    Any ideas on where to define the DML process?
    Thanks in advance.
    Barry D

    Hi Barry,
    Not knowing exactly what your URL calls, this is what I do for PL/SQL procedures that create HTML output:
    Create a blank page with no template and call the procedure inside a PL/SQL region with no template.
    Alternatively, if your URL opens in a new window:
    run some javascript for your link and pass a unique request through.
    The javascript needs to find the ApEx form, update it's target attribute and submit it with the unique request, then set the target back to blank.
    The form will submit into a new window.
    You can then have a process and branch allocated to this unique request to do what you want.
    Hope this helps
    Regards
    Michael

  • Conditional links in sql report

    Hi all,
    i have created a report with 5 columns. First 2 columns are copy and edit links, rest 3 columns are the corresponding row value. If i click on copy then the primary key of the selected row is passed over to the next detail page and details are shown there. Similar is the case with edit link.
    But i want to show edit link with only those rows, which the user have access. The table shows all the detail, but the link should only come when the user has the privilege to edit it. Can i provide conditionality in SQL Report link column?
    Do reply. Thanks in advance
    With Regards,
    Sunil Bhatia

    Dear Sunil Bhatia!
    I'm not sure if it is possible to make a column link conditional so I would suggest you a little workaround. On the detail page where your edit link leads to create a validation (page processing). This should be a page level validation of type SQL or PL/SQL as you like. This validation could check the user rights with SQL and depending on the result of the validation show an error message like "Sorry, You don't have enough rights to edit this row!" or it could display the detail page to edit the row.
    I hope this will help you along.
    Yours sincerely
    Florian W.

  • Solution to allow users to specify which columns of a sql report to search

    Starting Point:
    1) You have an existing SQL Report.
    2) You want to provide functionality to search through the result set.
    Start -----
    1) add a text_item for searching PX_search where X is page number
    2) add a button which resubmits the page. Go
    3) You modify your query by adding the following to the end of the where clause.
    and (PX_SEARCH is null or instr(column_name1,PX_SEARCH) > 0 )
    4) So far so good but it only allows searches on 1 column, so you add a few other columns
    and (PX_SEARCH is null or instr(column_name1,PX_SEARCH) > 0 or instr(column_name2,PX_SEARCH) > 0 or instr(column_name3,PX_SEARCH) > 0 )
    Now when you enter some text if it is in any of the columns that row will be displayed.
    This can be good or bad depending on your requirement. lets say my users want to specify the column they are searching on.
    5)further enhancement
    i) add a LOV to your page which queries the all_users data dictionary view
    select column_name d, column_name r from all_users where table_name = 'MY_TABLE_NAME' and column_name not in ('COLUMN_NAME1,COLUMN_NAME2) order by column_name
    The idea here is to use the oracle data dictionary to get all the columns for your table(s) and ignore the columns you do not want.
    ii) add an item to your page e.g. PX_select_column which gets populated from the list of values.
    Now for each column you are going to allow a search on, the sql needs to be modified.
    Lets pretend that my firstcolumn is called member_id, my second column is called firstname and my third column is lastname
    Before we had this SQL
    (select * from table where 1=1)
    and (PX_SEARCH is null or instr(memberid,PX_SEARCH) > 0 or instr(firstname,PX_SEARCH) > 0 or instr(lastname,PX_SEARCH) > 0 )
    Remember we have added PX_SELECT_COLUMN which should contain what we have selected from the LOV.
    iii) So now we modify the query to be as follows:
    and (PX_SEARCH is null or decode(:PX_SELECT_COLUMN,'MEMBERID',instr(memberid,PX_SEARCH),0) > 0 or
    decode(:PX_SELECT_COLUMN,'FIRSTNAME',instr(firstname,PX_SEARCH),0) > 0 or
    decode(:PX_SELECT_COLUMN,'LASTNAME',instr(lastname,PX_SEARCH),0) > 0 )
    The user can now choose which column to filter their results on.

    Here is a basic one (http://apex.oracle.com/pls/otn/f?p=2230:1). You can select an object type and put in criteria for the object name like '%b%'. The SELECT statement is dynamically generated with only the pieces of the WHERE clause that are needed. You do not need all the DECODE and INSTR OR logic.
    The main part of this example is the computation of the SQL SELECT statement:
    DECLARE
      v_sql VARCHAR2(2000) := 'SELECT *'||CHR(10)||'  FROM USER_OBJECTS';
      v_and BOOLEAN := FALSE;
      v_where VARCHAR2(2000);
    BEGIN
      -- P1_OBJECT_TYPE has value of 'ALL' for '%'
      IF (:p1_object_type != 'ALL') THEN
        v_sql := v_sql || chr(10) ||
                 ' WHERE object_type = '''||:p1_object_type||'''';
        v_and := TRUE;
      END IF;
      IF (:p1_object_name IS NOT NULL) THEN
        IF (v_and) THEN
          v_sql := v_sql || chr(10) ||
                   '   AND object_name LIKE UPPER('''||:p1_object_name||''')';
        ELSE
          v_sql := v_sql || chr(10) ||
                   ' WHERE object_name LIKE UPPER('''||:p1_object_name||''')';
        END IF;
        v_and := TRUE;
      END IF;
      :p1_sql := v_sql;
      RETURN (v_sql);
    END;Mike

  • Column link in interactive report to run procedure and refresh

    I have an interactive report which displays a report based on a table. This is a summary table populated overnight from some complex spatial analysis, which takes a few hours to run. I have a requirement to allow the user to refresh one row in this table - they would do this during the day if they needed to see the most up-to-date values.
    I have a package with two stored procedures - one which does the full refresh of the table, and one which refreshes one row when PK is passed in.
    One of the columns in the table is 'last_refreshed' which is a date - this is shown in the interactive report including minutes.
    I was thinking that maybe I could include a hyperlink on this 'last_refreshed' date column in the report. When a user clicked on it, it would run the stored procedure for that row and would refresh the report.
    Any ideas on how I could do this? I've hit a bit of a dead end for now.
    Thanks

    OK, I worked it out.
    I created an application item to store a global variable.
    Then in the column attributes of the report, I set the 'last_refreshed' to be a linked column, setting target to the current page and then setting the application item global variable to be the row PK.
    Then I have a Process which runs the required stored procedure reading the application item global variable, set to run on page load.
    Sorted.

  • Column Links in Apex Reports

    I am using version 4.0 of APEX.  My question concerns linking to other APEX pages from a report.  In APEX we link to another page, which may be a form or another report, by using a column in the report as a link column.  Any column may be used to transfer values from any other column.  This works fine, but the disadvantage is that whichever column is used as the link column has a heading which identifies the column's purpose but may not identify the purpose of the transition to another page.  In Oracle Forms, we could use buttons as a column of the multi-row screen (i.e. same as APEX report), and the button's label identified the purpose for the transition.
    Is there any way to create a column in an APEX report  to serve the same purpose as the button in Oracle Forms?

    Doug wrote:
    I am using version 4.0 of APEX.  My question concerns linking to other APEX pages from a report.  In APEX we link to another page, which may be a form or another report, by using a column in the report as a link column.  Any column may be used to transfer values from any other column.  This works fine, but the disadvantage is that whichever column is used as the link column has a heading which identifies the column's purpose but may not identify the purpose of the transition to another page.  In Oracle Forms, we could use buttons as a column of the multi-row screen (i.e. same as APEX report), and the button's label identified the purpose for the transition.
    Is there any way to create a column in an APEX report  to serve the same purpose as the button in Oracle Forms?
    When discussing "reports" it is essential to indicate whether this means a standard report or an interactive report in order to receive an appropriate response.
    It is possible to create a link column that is distinct from report data columns. In standard reports, this is done using the Add Column Link option from the Tasks menu in the right sidebar of the Report Attributes page. In interactive reports, define a Link Column on the Report Attributes page.
    To provide further information about links to users in both cases, specify an HTML title attribute for the link in the Link Attributes property of the link definition. This will be rendered as a tooltip when the cursor hovers over the link in visual browsers, and as an audio cue on navigation to the link when using a screen reader.

  • CSS to format a textarea column in an SQL report

    I'm using the following CSS class called "fixed" to format a multi-line column (textarea) in a standard SQL report (Column Formatting Attribute: CSS Class). Each row is now hard coded to a height of 40px or about 4 rows with a scrol bar. If the row has no data in it I'd like to default the row to a height of 1. Is it possible to do that?
    <style type="text/css">
    .fixed {display:inline-block; width:150px; height:40px; overflow-y:scroll; font-size:9px;}
    </style>
    regards
    PaulP

    PaulP wrote:
    I'm using the following CSS class called "fixed" to format a multi-line column (textarea) in a standard SQL report (Column Formatting Attribute: CSS Class). Each row is now hard coded to a height of 40px or about 4 rows with a scrol bar. If the row has no data in it I'd like to default the row to a height of 1. Is it possible to do that?
    <style type="text/css">
    .fixed {display:inline-block; width:150px; height:40px; overflow-y:scroll; font-size:9px;}
    </style>Try <tt>max-height:40px</tt> instead.
    For a less speculative response, provide complete information on the environment and any restrictions therein:
    <li>Full APEX version
    <li>Full DB version and edition
    <li>Web server architecture (EPG, OHS or APEX listener)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region type(s)
    and a reproduction of the issue on apex.oracle.com that we can experiment with.
    Is this just to limit the size of an actual report or is the <tt>textarea</tt> editable within a tabular form ? If the former I'd just use a <tt>div</tt>...

  • Getting Column names from SQL report

    I have a SQL report as follows:
    select ename, dept, manager
    from emp;
    I need to be able to dynamically access the column names being displayed inside APEX so I can use in a List of Values. I can't use all_tab_columns. Is there an internal APEX table/view that I can accxess that will give me all of the columns that are eing displayed in a SQL report?

    Hi Bob,
    Try this -
    1) Give your report region a static id
    2) Use the following query -
    select
      heading d,
      column_alias r
    from
      apex_application_page_rpt_cols
    where region_id = 'FOO';Obviously change 'FOO' to match your region id, and look at the different columns available in the apex_application_page_rpt_cols view to see what best suits you.
    The APEX dictionary rocks ;)
    Hope this helps,
    John.
    http://jes.blogs.shellprompt.net
    http://apex-evangelists.com

  • Image as a column link in a report

    Hi folks,
    I want my thumbnail to be the link in my report. I have set my "Link text" as #THUMBNAIL#. In the help for the "link text" it says "Enter the HTML text to be shown as a link. Use an image tag to display images, or pick from the list of default images.
    " . I cant get the syntax right for this however... Can anyone help??
    thanks,
    Rod

    Hi Rod,
    The best thing to do would be to select one of the image icons (eg, [Icon 1]) and then edit the HTML string that is put into the "Link text" field.
    If you pick Icon 1, you get:
    &lt;img src="#IMAGE_PREFIX#edit_big.gif" border="0" alt="Icon 1"&gt;
    Now change this to something like:
    &lt;img src="#APP_IMAGES##THUMBNAIL#" border="0" alt="Icon 1"&gt;
    or
    &lt;img src="#WORKSPACE_IMAGES##THUMBNAIL#" border="0" alt="Icon 1"&gt;
    depending on if you selected an application for the image or if it is to be available throughout the workspace.
    Regards
    Andy

  • Modify Template to show columns like a SQL report

    Hi All,
    Really urgent. We have a procedure and we are using a pl/sql block to get the query. The layout is not nice so they want me to look at the template and change it so the result look like a sql query.
    Thanks.

    Hi,
    OK - if you are using the htp package to output the entire report, then firstly you should have a look at: [http://download.oracle.com/docs/cd/B14099_19/web.1012/b15896/pshtp.htm]. You will see that you have many more options than htp.p or htp.prn - there are htp.tableOpen, htp.tableRowOpen, htp.tableHeader and htp.tableData options for example. Using these, you can add in table/row/cell attributes that will include the styling that you need to get your report to display as you need.
    The best thing to do would be to look at the defintion of a report template that matches the style you need and then make a note of the attributes that are used for the TABLE, TR, TH and TD tags.
    For example, on my Theme 18, "Standard" report template, the Column Template 1 setting (which is for the data within the table) is:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data"&gt;#COLUMN_VALUE#&lt;/td&gt;so, in your code, when you want to output the data, you can use:
    htp.tableData(columnname, 'LEFT', null, null, null, null, 'headers="' || columnname || '" class="t18data"');Anything on the report template that does not have a corresponding parameter in the htp function, needs to be added into the final parameter - in the above example, the headers and class attributes do not match parameters in the htp.tableData() function, so become a single string in the final parameter.
    You just need to identify the attributes you need for each TABLE, TR, TH and TD tag and construct them in a similar way in your output.
    Andy

  • Sorting report columns for PL/SQL report

    I have created a report of type "Pl/Sql function body returning Sql query" in which I am generating the column names within the query. I would now like to make the first three of these columns sortable. But when I click on the "sort" box for the first three columns, all my column names suddenly switch to "Col 1", "Col 2" etc.
    As you can see by the following snippet from the PL/SQL that generates the query, the column names are data driven, so I'm not in a position to declaratively rename each column. As it happens, the first three columns names are fixed, but all the subsequent column names are data driven.
    Suggestions on how to make the first three columns sortable while preserving the generated column names of the remaining columns?
    thanks
    susan weber
    declare
    query varchar2(4000); -- query
    begin
    query := 'select first_name "First Name", last_name "Last Name", encounter_date "Encounter Date" ';
    for c1 in (select distinct attr_src, attr_code, attr_text, sequence_number from finding_vt)
    loop
    query := query || ', (select val_text from finding_vt vt where vt.encounter_id = e.encounter_id and vt.attr_src = ''' || c1.attr_src || ''' and vt.attr_code = ''' || c1.attr_code || ''' and sequence_number = ' || c1.sequence_number || ') "' || substr(c1.attr_text,0,30) || '"';
    END LOOP;
    query := query || ' from patient pat, encounter e where pat.patient_id = e.patient_id';
    return query;
    end;

    This turns out to be related to the choice of "use generic column names" v. "use query specific column names".
    I had chosen "use generic column names" just to get past the initial creation page. I then debugged the query creation sql, but never changed that setting back to "use query specific column names". The fix is to choose "use query specific column names".

Maybe you are looking for

  • How do i print multiple images on one sheet in Photoshop CC?

    I can't even seem to select more than one image, surely there must be an easier way than using Layers to create a collage? I have used Easy-PhotoPrint EX package until now but I need something more professional now? Do you print multiples from Photos

  • Blue Screen Error when syncing ipod touch 4g 32gb with i tunes 10 on Vista

    Hi I'm trying to sync my ipod touch 4g with my itunes 10 using a Dell XPS with Windows Vista. After the point where the songs begin to copy (around 5 mins to 30 mins into copying) a blue screen error is caused and the computer shuts down automaticall

  • Maintaining non-cumulative values in Mlti provider

    Can we maintain non ucmulative values inteh multi ptovider   Extras - > Maintain non cumulative values section. I created few new cubes which has non cumulative keyfigures . In the cube I made 0CAL DAY as reference characteristic and selected  Compan

  • Email with image attached refuses to send

    Hello I am having a problem with my email. Whenever I try to send a email with a picture attached it refuses to send. Regular email still works as does emails with files(.exl,.pdf,.doc,) attached. I also doesn't appear to be email provider specific s

  • Dispaly or Hide a column based on Prompt Value

    Hi All, How can I Display or Hide a Column based on Prompt Value selected? On my dashboard I have a Report/Request and a Dashboard Prompt. Dashboard Prompt has three values, say: *'A', 'B' and 'C'*. And my report/request has three columns named *'Fie