parapr wrote:Hi parapr
I am using Oracle forms 10g R2 on windows XP.
I have 6 item in tabular block which will display data from database depending on values provided by another block item. I want data should be order by any of this 6 item which should be chose by user.
So I have Created one list_item and allow user to choose order by column, and use that item in my order by clause query.
Ex: ORDER BY :BLOCK.LIST_ITEM
But the data is not coming in order selected by user.
I have checked value for :BLOCK.LIST_ITEM , value is coming but sorting is not getting.
Hope this helps...
replace EMP with your datablock-name, and make sure that BLOCK.LST_ITEM contains correct values. You can check that after executing a query by showing the contents of :SYSTEM.LAST_QUERY, e.g. using message.
GO_BLOCK('EMP'); Set_Block_Property('EMP',ORDER_BY,:BLOCK2.LST_ITEM); EXECUTE_QUERY;
My Block is non database block, thats why its not working or what?Hi,
Hope this works..
CURSOR C IS SELECT EMPNO,ENAME FROM EMP ORDER BY TRIM ( CASE :TX_LIST --here is the list item with one value WHEN 'ENAME' THEN ENAME END ) ASC;