Search code examples
oracle-apex

oracle Apex interactive report columns based on list values


In interactive reports I want to dispaly the deacription not the ID, I tried using the Plain Text(Based on List of Values) column type and it showed the decription how ever the records cant be edited now with 'ORA-01403: no data found'. How can I achive this. I am using APEX 22

Using the PlainText type the record will be editbale with now issues, but the column is showing the ID not the description.


Solution

  • I'd use wizard to create [report + form] pair of pages; doing so, you'd get both pages working properly. Then you can make them fancy, if you want.

    I don't know what you did wrong. I've just created an example in my database/Apex, everything works as expected.

    • in shared components, I created list of values (lov_dept) as

      select dname d, deptno r from dept
      
    • using the wizard, I created interactive report + form

      • source table is Scott's emp, with empno being the primary key column
    • deptno column's type was "plain text"; it means that it would display e.g. "10" (department number)

      • as you want to display description (i.e. department name), column's type is changed to "plain text (based on list of values)"; I chose lov_dept from list of values for that column.

    Run the page

    • interactive report shows department name (e.g. "ACCOUNTING") instead of department number
    • edit icon (in report's first column) leads to form page, passing empno (the primary key column) and fetching data (as expected)

    enter image description here


    That's what you should have done. See if you can find where you did wrong; if not, recreate the whole thing from scratch, following these instructions.