This discussion is archived
6 Replies Latest reply: Dec 4, 2012 11:41 AM by 744772 RSS

Edit selected row on an interactive report

744772 Newbie
Currently Being Moderated
I have an interactive report on which I can select a row, open a subform containing the selected row's data, make changes and update the selected row. The subform works fine as long as I use text boxes. I want to replace some of the text boxes with list boxes, which populate with the selected row's respective column value, just as the text box does, but would additionally allow the user to select a new value from the LOV, which will then be used to update the selected row.

Can anyone help me with this?
  • 1. Re: Edit selected row on an interactive report
    VC Guru
    Currently Being Moderated
    Are you looking for a Combobox item

    Thanks,
    Vikram
  • 2. Re: Edit selected row on an interactive report
    744772 Newbie
    Currently Being Moderated
    Thank you for your reply!

    I don't know for sure, but I'm doubtful. I need to be able to click on a record in the interactive report and open a subform containing only the selected record's data, for the purpose of editing columns in the selected record. The fields on the subform will be a combination of text and drop-down list boxes (called combo boxes in Access).

    Here is what I need to do:

    Say my subform only has 1 combo box, bound to a column in the report called "USERNAME". Say the LOV for the combo is derived from a table called USERS. If I selecting a record in the report where the USERNAME is "POWELL" will place "POWELL" in the combo box on the subform, once it is open.

    Now, I want to change the USERNAME to "MARVIN", so I click on the combobox and select MARVIN from the USERS table. Then I save the record. Wen I go back to the report, I need to see that the record now contains a USERNAME of "MARVIN" in place of "POWELL".

    This is really easy to do in Access for example, but I can't seem to find doc. on here that shows how to do the same thing in APEX.
  • 3. Re: Edit selected row on an interactive report
    VC Guru
    Currently Being Moderated
    I understand that you need a Form on a Table with Report

    See documentation http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_frm.htm#HTMDB05029
  • 4. Re: Edit selected row on an interactive report
    744772 Newbie
    Currently Being Moderated
    This looks promising. I'll give it a try and let you know. Thank you very much for taking time to help!
  • 5. Re: Edit selected row on an interactive report
    744772 Newbie
    Currently Being Moderated
    I haven't tried the wizard yet, but I'm hopeful that it will walk me thru creating combo boxes linked to tables from which I can select values to update the master table record. I'm a little dubious that the wiz will be that smart, but one can hope.
  • 6. Re: Edit selected row on an interactive report
    744772 Newbie
    Currently Being Moderated
    I figured this out. I changed the form field from a text box to a select box,
    entered a LOV definition like this:

    select CONT_DEPT_NAME display_value, CONT_DEPT_ID return_value
    from CONTACTS_DEPARTMENT
    order by 1

    set the LOV Display Null setting to "Yes", Changed the Default Value Type setting to "PL/SQL Function Body", and entered a PL/SQL statement under default to return a single value from an table, like this:

    DECLARE
    v_value VARCHAR2(<your data max length>);
    BEGIN
    SELECT <yourcolumn>
    INTO v_value
    FROM <yourquery>;
    RETURN v_value;
    END;

Legend

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