I created a manual tabular form (based on a collection) with 1 date_popup2 field in it. This field is defined in the query as follows:
, apex_item.date_popup2( p_idx => 18 , p_value => c004 , p_date_format => 'dd-mm-yyyy' , p_item_id => 'f18_' || lpad (rownum, 4, '0') , p_item_label => 'Start date' ) as tf_br_start_date
In the report attributes I marked this column to be sortable.
However, in the page the sorting is not working. It looks like it's always sorted in the order of the seq_id.
Can anyone tell me how to solve this?
You need to make it a habit of using TO_DATE() to convert strings/varchar2s (ie C004) to a DATE data type.
Please replicate it on apex.oracle.com
Don't forget to create a developer account so you don't have to post your email for spammers to harvest.
I'd call it a bug/missing feature.
It appears that within a Basic report, sorting on a column created using APEX_ITEM.DATE_POPUP2() does not sort by date.
I'd file this with Oracle Support and see what they say.
Include a link to this thread and your workspace login information.
I got something to work by: (probably not what you want.)
I suspect: since you don't start with p_idx => 1, this column becomes "1" ==> g_f01
Thanks for looking at this!
The workaround you propose is something I had in place before using the date_popup2, but I have 2 reports on 1 page both with date fields in them: in both reports the date will get f01 as id and that gives a lot of issues processing the input.
I'll create a SR with Oracle Support and report back here when I get an answer.