Right now i am developing a report,in which a user can
choose groupby on a certain coulmn(so the user
parameters will be Group number or Cycle Number or
Account TYpe).

I am quering from only one table,ra_customers.

so my query will be


select :x_by,sum(....columns)
from ra_customers
where (all the conditions)
:x_recgrp;


In the after parameter trigger,


if :x_groupby = 'Group Number' then
:x_by :='ra_customer.attribute14';
:x_recgrp := 'group by attribute14';

elsif :x_groupby = 'Cycle Number' then
:x_by :='ra_customer.attribute10';
:x_recgrp := 'group by attribute10';

elsif :x_groupby = 'Group Number' then
:x_by :='ra_customer.attribute11';
:x_recgrp := 'group by attribute11';

endif;

Let us assume that one is grouping by 'Group
Number'then the result is displayed as.

ra_customer.attribute14 13 15
ra_customer.attribute14 10000 30000
ra_customer.attribute14 4000 7000


Instead of the acutal row value,since i used the
string value in after parameter trigger,it is
displaying coulmn header title.any solution to
this,.Is it possible to use decode in the select statement.