This discussion is archived
3 Replies Latest reply: Sep 26, 2013 6:19 AM by Priyasagi RSS

Sorting issue with Oracle reports

User488670-OC Newbie
Currently Being Moderated

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);

else

    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.

 

-Ramprasad

Hitachi.

Legend

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