This discussion is archived
6 Replies Latest reply: Nov 27, 2012 5:38 PM by vyuvaraj RSS

Editable Interactive Report

Gus C Journeyer
Currently Being Moderated
Apex 4.2

I have been looking at this example of how to create an editable interactive report

http://dbswh.webhop.net/htmldb/f?p=BLOG:READ:0::::ARTICLE:137800346674748

I have it working, but I am now trying to update my table from the collection.
I have a page process that updates the table from the collection but at the moment it is
neccessary to click a submit button.
I don't want to do the update in the application process as I will be changing the page process to a process in the database.
Ideally, the user should not need to click this button, the update should be made automatically.
Is it possible to do this with a dynamic action.

Workspace: GUSCRIGHTON
User: ANGUS.CRIGHTON@HAVILOG.COM
Password: terminator

Application Name: Editable Report
ID: 13123
Page: 2

Cheers

Gus

Edited by: Gus C on Nov 8, 2012 2:14 AM
  • 1. Re: Editable Interactive Report
    Gus C Journeyer
    Currently Being Moderated
    Any suggestions appreciated

    Gus
  • 2. Re: Editable Interactive Report
    RodWest Guru
    Currently Being Moderated
    Hi Gus,

    I am not sure what advantage using a collection gives you if you want the updates to be made immediately in the underlying table. So you could just run the report from the table and use an application process to update the table similar to the way you are now update the collection.

    You could run the application process using a dynamic action on the IR but that would really just be an alternative to using the javascript in the header that you use already.

    Rod West
  • 3. Re: Editable Interactive Report
    Gus C Journeyer
    Currently Being Moderated
    Hi Rod

    I am using a collection because I am having problems with the update if people move the report columns around or deselect columns.
    The update to the table needs to be done from a package in the database, as that is our standard.

    So I think I need a dynamic action that fires on change of a field and calls the process in the database.
    Any ideas on that ?

    Gus
  • 4. Re: Editable Interactive Report
    RodWest Guru
    Currently Being Moderated
    Hi Gus
    I am using a collection because I am having problems with the update if people move the report columns around or deselect columns. The update to the table needs to be done from a package in the database, as that is our standard.
    I still not sure what the problem is here. You know what columns have changed and the update can be done using a package so without knowing your environment it is hard to see why this is a problem
    So I think I need a dynamic action that fires on change of a field and calls the process in the database. Any ideas on that ?
    You could create a DA which fires on a change to a value in the IR. However, you already have an onclick action on the IR to update the collection which is set up in the header javascript. So I would look at adding to this action or adding code to the application process rather than trying to do something different with a DA.

    Rod West
  • 5. Re: Editable Interactive Report
    Gus C Journeyer
    Currently Being Moderated
    Thanks Rod

    I added an apex.submit to my javascript in the page header and now it seems to work.

    Cheers

    Gus
  • 6. Re: Editable Interactive Report
    vyuvaraj Newbie
    Currently Being Moderated
    I've the following in the application process:

    function saveValue(){
    $.htmldbAjax({
    data:{
    p_request:'APPLICATION_PROCESS=SAVE_IR_VALUE',
    x01:pSeqId,
    x02:pColIdx,
    x03:$v("htmldbir_value_change")
    },
    success:function(d){
    if(d=='OK'){
    gReport.pull();
    }else{
    raiseError();
    }
    },
    error:function(){
    raiseError();
    }

    How can I update the record in the table?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points