3 Replies Latest reply on Sep 26, 2013 1:19 PM by Priyasagi

    Sorting issue with Oracle reports


      Hi Friends,

      I have developed a  oracle custom report(rdf) as XML Publisher Report through a RTF template on Account Recievable(R12).

      Report having a parameter called sort_by. User can select either TRANSACTION_NUMBER or CUSTOMER_NUM as run time..


      Brief history:

      When user select Parameter as TRANSACTION NUMBER: Data should sort on TRANSACTION NUMBER as primary and CUSTOMER NUM as secondary

      When user select Parameter as CUSTOMER NUM, data should sort on CUSTOMER NUM as primary and on TRANSACTION NUMBER as secondary  .


      I have built below logic in the before report trigger through a palce holder


      if  p_order_by='TRX_NUMBER' then

          order_by:= ' Order by to_number(trx_number),to_number(customer_num);


          order_by:= ' Order by to_number(customer_num),to_number(trx_number);

      end if;


      I am experiencing an issue on data sorting like,  report is sorting only on TRANSACTION NUMBER  and not performing the sorting on CUSTOMER NUM when parameter is CUSTOMER NUM.

      Anyone having any suggestion/solution on it..

      Please share your valuable inputs for the same.