Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you add an edit button to each row in a report in Oracle APEX?

I'm using Oracle APEX and I have a report region in a page that displays columns from a SQL query. I want to add edit buttons to the first column of this report so that the user can click on it and edit/review one of the results. How do I add this edit button? Thanks.

like image 595
Corrine Avatar asked Jul 02 '09 17:07

Corrine


People also ask

How do you make an interactive report editable in Oracle APEX?

In the pop-up dialogue select the form you just created and remember to add the primary key from the interactive report matching primary key on the form you're going to. Save your work run the IR and click the pencil and it will navigate to the form you just created and will show the correct record to be edited.

How do you add a button on interactive grid?

Do the right-click on the interactive grid region and select the option Create Button and set the following properties: Button Name: Add. Label: Add. Button Position: Copy.

What is interactive report in Apex?

The Interactive Reporting Region is an innovative new technology that allows end users to customize reports. By putting more power in the hands of users it reduces development time and effort while simultaneously enhancing application functionality.

How many types of buttons are there in Oracle APEX?

There are 3 main button types described in material design. The raised button is a standard button that signify actions and seek to give depth to a mostly flat page. The floating circular action button is meant for very important functions.


2 Answers

  1. Add a column to the SELECT statement of the report like this:

    SELECT '' edit_link, -- This is the new column
        ...
    
  2. Go to the Report Attributes tab.

  3. Move the new column EDIT_LINK to the top of the list of columns (if you want it to be first).

  4. Click on the pencil and paper icon to the left of the EDIT_LINK alias to open the Column Attributes page.

  5. Go to the Column Link section of the Column Attributes page.

  6. Pick one of the icons shown as [Icon 1], [Icon 2], ... (alternatively you can use one of your own but that is more advanced).

  7. Fill out the remaining Link fields to specify which page of your application you want to go to when the link is pressed and what values you will be passing in. Lists of values are supplied to help with this. For example, you might specify:

    • Page: 42
    • Item 1 Name: P42_EMPNO
    • Item 1 Value: #EMPNO#

      (This would navigate to page 42, setting page item P42_EMPNO to the value of EMPNO in the current report row.)

  8. Press the Apply Changes button.

Now run the page and you will have an edit link for each row.

like image 67
Tony Andrews Avatar answered Sep 27 '22 19:09

Tony Andrews


You can use the Column Link section (as per Tony Andrews' answer) on any column in the report to add links. e.g. "Emp Name" might link to the employee details, "Dept Name" might link to the details for the department, etc.

like image 45
Jeffrey Kemp Avatar answered Sep 27 '22 17:09

Jeffrey Kemp