views:

1030

answers:

3

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.

+3  A: 

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 an [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.

Tony Andrews
+1  A: 

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.

Jeffrey Kemp
A: 

Excellent tips but what happend if some values changes before go to another pages? For example i have a field called amount in my report show me an initial values 100.00 then the end user changes this value to 300.00 how I can sent the new value to another pages? if its possible?

email = [email protected]

thanks

JORGE