This discussion is archived
5 Replies Latest reply: Oct 10, 2013 5:42 AM by user413874 - oracle RSS

How do you trigger Column Sorting from page item in APEX Interactive Report?

user413874 - oracle Newbie
Currently Being Moderated

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

Legend

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