Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic sorting based on parameters

Status
Not open for further replies.

sikkilamkiran

Programmer
Aug 9, 2005
21
IN
hi all,

i have a probelm on sorting.
i have 4 feilds in my report (process,subprocess,control and dimension) , i want to sort the data based on the parameter passed by the user. if he passes process the report has to sort by process column, or else if user selects control the report has to sort by controls column. i would say dynamic sorting based on user parameters.

Please help me out.its urgent...
Regards
kiran
 
Create a string parameter {?sort} with options of process, subprocess, control and dimension. Then create a formula {@sortselected}:

select {?sort}
case "process" : {table.process}
case "subprocess" : {table.subprocess}
case "control" : {table.control}
case "dimension" : {table.dimension}
default : ""

Then go to report->record sort->and add {@sortselected} as your sort field.

-LB
 
hi lbass,
thank you very much,i got the same idea after i posted i tried out this code and it worked.. but any how thanks for the instant reply .. you are always ready with an answer.

if {?sort_column}='dimension' then
{Control_Center_BE.Dimensions Name}
else if {?sort_column}='subprocess' then
{Control_Center_BE.Subprocess Name}
else if {?sort_column}='objective' then
{Control_Center_BE.Objective Name}
else if {?sort_column}='library' then
{Control_Center_BE.Library Name}


regards
kiran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top