Hi guys!
On a certain page, I have an APEX Interactive Report. Part of the query is similar to:
SELECT
...,
(column1 definition) BCV,
(column2 definition) RFV,
...
table.RAU ,
FROM table_name table , ...
WHERE conditions;
I also have a page item P121_SORT_BY (select box) defined through the following LOV:
SELECT 'BCV' d,'BCV' r FROM DUAL
UNION ALL
SELECT 'RF Value' d,'RFV r' FROM DUAL
UNION ALL
SELECT 'RA (USD)' d,'RAU' r FROM DUAL
I have linked a Dynamic Action to P121_SORT_BY that executes on event "Change" and executes the following JavaScript Code:
var my_column= $v('P121_SORT_BY');
//alert('test1');
$x('apexir_COLUMN_NAME').value = my_column;
//alert('test2');
gReport.column.order('DESC');
//alert('test3');
//alert(my_column);
Obiously, there's something wrong with my JS code... what can I do to make my Interactive Report sort DESCENDING by the column selected in my page item?
Please note that I also tested the JS without the comments, and I get the pop-ups (test1, test2, test3 and the correct name of the column in my_column) but the report doesn't get sorted... what am I doing wrong?
Thanks,
Horatiu