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.

Similar Messages

  • Link column from an interactive report to insert a row in a tabular form

    Hi, I need your help, i'm new on APEX and i really need to make a "link column" from an "interactive report" to insert a row into a "tabular form".
    I mean that when you click the "link column" instantly create a new row in the Tabular form with the information of the linked row on the interactive report. Its something like that.
    I really appreciate your help.
    Ricardo Capuz

    Hi Ricardo,
    You can use the following code as per your requirement (this is just an example),
    (In this case IR report is in Page#1 and Tabular form is in Page#2),
    On Page#1, Create a hidden item (i.e 'P1_ID')
    IR Report query as like the below,
    select empno,
    ename,
    job,
    mgr,
    hiredate,
    sal,
    comm,
    deptno,
    empno "copy"
    from empUse the below JS code in Page HTML Header section,
    function f_insert_row(pSub)
        $s('P1_ID',pSub);
        doSubmit('ADD');
    Edit  Report Attribute -> copy column -> Under Column Link
    Link Text: Select your column name (i.e. #EMPNO#)
    Target: URL
    URL: javascript:f_insert_row(#EMPNO#);
    Then create a process to insert like below,
    BEGIN
    insert into emp_test (select * from emp where empno=:P1_ID);
    END;Process condition as * Request=Expression1* in Expression1 as 'ADD'.
    At last, create a branch to Page#2, Check 'include process success message' and with the same condition as * Request=Expression1* in Expression1 as 'ADD'.
    Thanks,
    Lakshmi

  • Substitution for DB link in Interactive report

    Hi,
    Is it possible to use substitution strings for DB link in Interactive report in same way like it works in Classic reports (by choosing Generic column) or in any other way.
    Currently when i'm trying to put SQL like :
    select empno, empname from emp@&DB_LINK.
    I receiving the error •Query cannot be parsed, please check the syntax of your query. (ORA-02019: connection description for remote database not found)
    APEX 4.1, Oracle 11.2

    It is possible. We have an application that uses the same code set (pages) where the user can select which target instance will be used at run time.
    The trick is that the DB link substitution variable must contain the "@" character. So your query looks like:
    select ...
    from my_table&TARGET.
    where...
    &TARGET. must be something like "@my_database" .
    At compile time, &TARGET. will be null, and the table name can be resolved, if there really is a table, my_table in your parsing schema, or a vaild synonym.
    You can have a synonym available at "compile" time, when you save the page source. For example, the synonym my_table equates to my_table@your_database, which has to exist.
    There several other things that must be done, but this should get you started.

  • Can I link from Interactive report Page 1 to Master Detail page 2?

    Hi folks-
    I know how to create a Page as an Interactive Report; it creates 2 pages automatically (primary page with the great interactive bar) and a 2nd page that's a single record.
    I know how to create a Page as Master Detail, whereby I get a tabular list without the super interactive bar, and I can select a record, and get transported to a nice page with 2 regions (master on top, detail on bottom).
    I want to have the First page from the Interactive Report, select the record, and go to the 2nd page of a MasterDetail.
    Do I create the Interactive Report, and customize the 2nd page, to add a region?
    Or, do I create both page types, and redirect from the 1st page of the Interactive Report to the DML Form from the MD report? I tried that, re-assigning the link from the Interactive Report to be a Link to Custom Target, and specify the page # of the Master-Detail page. And it is taking me to the right page, but the data from the selected row is not coming with me, and the detail in the bottom region is not appearing at all.
    Can someone please give me a nudge as to the sequence I should be doing?
    (As you can tell, I'm new to Apex.... I'm trying to use it to create a prototype or proof-of-concept for a database driven web application)
    Thank you
    Marion

    Yes, I tried that after I wrote to you - and it's fine, but not what I'm after; it's only based on 1 table and I'm working with 2 tables.
    Perhaps I can explain in better.
    I want one page as an interactive tabular report (of the master records)
    I want to select a row, and transfer to a page that has the corresponding row on top (as a form), and a tabular region below of records from a related detail table.
    ie, I want page 1 from the Interactive Report, and page 2 of the Master Detail report.
    OK - I just took the form page, and added a region below in a tabular report. And I'm getting the data, but I'm getting all the records (not just the ones associated with the single record on top. I figure I need to edit the Region Definition->Source (to specify that the id numbers need to match), but the code is not editable.....
    So I am in Structured Query Attributes, and I've Modified the Join Conditions - but I still get all the detail records in the bottom region. I''m trying to add in the ( + ) qualifier, but it doesn't affect anything...
    I'm soo close to what i'm trying to do!
    Thank you for your continued patience and assistance
    Marion
    here's the Source I have for the region..... (I'm including the excess ID columns just for learning purposes)
    SELECT
    "PHONENUMBERS"."PHONE_ENTITY_ID" "PHONE_ENTITY_ID",
    "ENTITIES"."ENTITY_ID" "ENTITY_ID",
    "ENTITIES"."FIRSTNAME" "FIRSTNAME",
    "ENTITIES"."LASTNAME" "LASTNAME",
    "ENTITIES"."COMPANY" "COMPANY",
    "PHONENUMBERS"."PHONE_ID" "PHONE_ID",
    "PHONENUMBERS"."PHONETYPE" "PHONETYPE",
    "PHONENUMBERS"."PHONENUMBER" "PHONENUMBER",
    "PHONENUMBERS"."PHONECOMMENT" "PHONECOMMENT"
    FROM
    "PHONENUMBERS",
    "ENTITIES"
    WHERE ENTITIES.ENTITY_ID = PHONENUMBERS.PHONE_ENTITY_ID
    Edited by: mtpaper on Oct 12, 2009 1:30 PM
    Edited by: mtpaper on Oct 12, 2009 1:32 PM

  • New column header on Interactive Report

    We have an interactive report on a view and when we add a new column to the view, we would need the report to add the header automatically too (without previous deployment). Can this be done in simple manner?
    Thanks,
    Ricardo

    Hi,
    I have tested the behavior of the different reports in Apex.
    This is the conclusions:
    Created a new column in a test table and running directly the Apex application with the table mapped in three reports:
    1- Interactive Report:
    - No errors in the report when you open it but the new column is not showed.
    2- Classical Report with default options:
    - Errors showed when you open it (ora-01403 No data found)
    3- Classical Report with the option checked "Use Generic Columns Names":
    - It shows automatically the new column in the report.
    But still I do not have a solution to solve the problem.
    Regards,
    Ricardo

  • Display a conditional link in interactive report

    Hi, I would like to display a link in a column of an interactive report, if the value of this column is not null.
    This is the sql code.
    Select
    (case
       when mytable.myvalue is not null then ('<a'||' href="'||'f?p=&APP_ID.:59:&APP_SESSION.::NO:59:P59_ITEM_ID:'||mytable.value||'">'||'<img src="#IMAGE_PREFIX#menu/download_32.gif">
    </a>')
       else null
    end) link
    from
    mytableI also tried apex_uil.prepare_url.
    Select
    (case
       when mytable.myvalue is not null then ('<a'||' href="'||apex_util.prepare_url('f?p=&APP_ID.:59:&APP_SESSION.::NO:59:P59_ITEM_ID:'||mytable.value)||'"><img src="#IMAGE_PREFIX#menu/download_32.gif">
    </a>')
       else null
    end) link
    from
    mytableAlthough it seems that is correct, instead of displaying the link, the report displays the html text of the link
    (I omitted the first *<* and the last *>* to display the text in the thread):
    value displayed a href="f?p=101:59:4377010977110083::NO:59:P59_ITEM_ID:146"><img src="/i/menu/download_32.gif"></aI did a lot of researchs of implemented solutions, but to me always return the same result.
    I hope someone can tell me the solution or my mistake that maybe at this time is escaping me.
    thanks
    greetings
    Edited by: diapason on Sep 8, 2011 9:09 AM
    Edited by: diapason on Sep 8, 2011 9:19 AM
    Edited by: diapason on Sep 8, 2011 9:33 AM

    >
    Welcome to the forum.
    Please read the FAQ and forum sticky threads (if you haven't done so already).
    Hi, I would like to display a link in a column of an interactive report, if the value of this column is not null.
    This is the sql code.
    Ah. It looks like you've now found the instructions on how to post code...
    Although it seems that is correct, instead of displaying the link, the report displays the html text of the link:
    value displayed
    <a href="f?p=101:59:4377010977110083::NO:59:P59_ITEM_ID:146"><img src="/i/menu/download_32.gif"></a>I did a lot of researchs of implemented solutions, but to me always return the same result.
    I hope someone can tell me the solution or my mistake that maybe at this time is escaping me.Ensure the Display Text As report column attribute is Standard Report Column rather than the default Display as Text (escape special characters).

  • Referencing columns in an interactive report

    I need to link an interactive master report in APEX to a interactive detailed report. Both reports have a common column name (PCN). To create a link from the master report to the detailed report, we must specify a "Name" in the column link section for the column in the master report. My question is: how does one reference a column in an interactive report so an entry can be provided in the "Name" box in the column link section?
    I developed a solution by creating a text item (P1_PCN) in the detailed report and using P1_PCN as the "Name". I then modified the source for the detailed report to be: select . . . where pcn = :p1_pcn. However, what would we do if the user community wants the functionality to click on a variety of column values in the master report, e.g. filter the detailed report by a value of PCN or STHN or UIC or etc? I rather think this could be done but it would be very cludgy.
    Thanks

    Basically, you are doing it the right way.
    If you are sure that there are no overlapping column values, you can modify the query of the detail report to something like
    select . . .
    where (pcn = :p1_pcn
      or   sthn = :p1_pcn
      or   uic = :p1_pcn
    )

  • Problem adding column in an interactive report

    Hi all
    I am dealing with many interactive projects in my application. Sometimes I have to add a column to the interactive report. When I do so, the column doesn't appear in the interactive report...On the page I have to click on "Actions" then go to "Selected columns" and then display it ! the problem is when I logout and login again
    the column desappear again and I have to do samething again and again...Is there a way to set it appear by defaul always ???
    THank you

    Moun wrote:
    I am dealing with many interactive projects in my application. Sometimes I have to add a column to the interactive report. When I do so, the column doesn't appear in the interactive report...On the page I have to click on "Actions" then go to "Selected columns" and then display it ! the problem is when I logout and login again
    the column desappear again and I have to do samething again and again...Is there a way to set it appear by defaul always ???After adding new columns to an existing IR, you need to select them for display as a developer, and save the new report as the Primary Default.

  • Best way to style a column in an interactive report?

    Since I'd rather not do it directly in the SQL used to populate the report, can someone suggest a clean way to style all cells of a given column from an interactive report? Perhaps all cells of interest can be addressed through jquey using the "headers" attribute they share?

    Oh, and I'd also like to make the vertical separations between cells aparent if possible....Please try this one:
    .apexir_WORKSHEET_DATA TD {border-style:ridge;border-color:#98bf21;
    border-width:3px;}For more details please visit:
    http://www.w3schools.com/css/css_border.asp
    Regards,
    Fateh
    If you believe that my answer was helpful or correct, then please mark it as helpful or correct..

  • Custom Column freezing in interactive reports

    Hi,
    Can anyone help me regarding column freezing in interactive reports?
    I want to keep few of the column of my IR fixed that is not scrollable(horizontally),selection of column to be freezed should also be there.
    Along with it i also want a horizontall scrollbar to appear for scrolling the report.
    Thanks,

    Hi Vish,
    I was informed by SAP few months back that Interactive Reports can not be enhanced with custom fields. I don't see any documentation regarding this.
    You may want to check with SAP also.
    Regards,
    Paparao Undavali

  • Problem with column groups on Interactive Report

    Hi
    I am hoping that someone can help with this problem.
    I am attempting to control both the grouping and ordering within each group of fields in the single row view of an interactive report. Creating column groups appears to be OK at first (sequence, name and description) but if I then attempt to edit the group, the sequence box appears to be empty even though it was filled with a unique number at the time of creating the group.
    In addition, any changes to the order of the fields within the group made using the shuttle box at the bottom of the screen don't seem to be saved even to the Apply Changes button is pressed.
    Anybody know what is happening here and can anyone suggest how to control both the order of the groups and ordering within each group?
    Thanks in anticipation
    Martin

    Moun wrote:
    I am dealing with many interactive projects in my application. Sometimes I have to add a column to the interactive report. When I do so, the column doesn't appear in the interactive report...On the page I have to click on "Actions" then go to "Selected columns" and then display it ! the problem is when I logout and login again
    the column desappear again and I have to do samething again and again...Is there a way to set it appear by defaul always ???After adding new columns to an existing IR, you need to select them for display as a developer, and save the new report as the Primary Default.

  • Colour code a column in an interactive report

    Hi
    Could anybody tell me how to colour code a column in an interactive report please.
    I am using apex version 3.1.
    Thanks in advance

    When your IR is displayed, go to the Actions Menu, choose "Highlight" and enter the condition when which row or field should be highlighted.
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • How to wrap a Column (Increase/Decrease column width) in Interactive Report

    Hi,
    I have a Interactive Report and I want to wrap the column values.
    Also want to increase/decrease width of the columns..
    I have 2 columns say.. Description and List
      List  - aaaaaaa, bbbbbbb, hhhhhhh, nnnnnnn, 222222, 55555555, 77777777, ..... // list of values are seperated by ,
             // 1. want to wrap the values ..I mean to decrease the width       
      Descriptiopn - sdgssdjkllkkkkkkkk  // -- here I want to increase the width of column
                     dgdggdfgdfgdgg
                     dfgdfgdfdfggfdg
                     dgdgdgdgdgdf2ndly for the List Column, can I put the sepearte values in each Line (values are seperated by , here) - ROW will only one.
    For each ROW, I want to display List column as shown below.
          List  - aaaaaaa
            bbbbbbb
            hhhhhhh
            nnnnnnn
            222222
    IS this possible in Interactive Report??
    Thanks,
    Deepak
    Edited by: Deepak_J on Feb 23, 2010 4:14 PM

    Actually, I want to increase/decrease the column width in Interactive Report.
    As shown the in the example of Description field...it's coming in 4-5 lines.
    I want to increase the width of Description column..so that it should come only in 2 lines..
    thanks,
    deepak
    Edited by: Deepak_J on Feb 23, 2010 4:32 PM

  • Hide logout link in interactive report

    Hi,
    Can anyone tell how to hide logout link in interactive report?
    Thanks,

    Hi,
    Sorry, I do not understand question.
    How you did get logout link to interactive report ?
    I have never seen that logout link is generated to report automatically.
    But id you go
    Home>Application Builder>Application xxx>Shared Components>Navigation Bar Entries
    and edit your logout link, you can set condition witch page you like it to be displayed or not to be.
    I think you mean that one
    Br, Jari

  • How to increase the column size of interactive report

    Hi , I am using apex 4.2 and theme 25 ..
    i did not find any option to increase the column size of interactive report. where as in classic report i can do so ,,
    Please guide me to achieve that.
    Thank You,
    Nihar Narla

    Nihar Narla wrote:
    Hi , I am using apex 4.2 and theme 25 ..
    i did not find any option to increase the column size of interactive report. where as in classic report i can do soThis can be done using CSS. Create a rule like this in the page Inline CSS property:
    .apexir_WORKSHEET_DATA td[headers="COLUMN_ALIAS"] {
      width: 10em;
    }where COLUMN_ALIAS is the alias of the column in the report query and the width measure is whatever you require.

Maybe you are looking for