Hi,
I am doing sorting depend upon report parameter.
Example given below. For that i have written a formula @SortBy. But the problem is that a formula can return only one type value. But my report column are multiple types e.g. string , date, Number etc.
So if i convert date or number into string the sorting is not proper for date or number columns.
@SortBy Formula
if {?orderByPrm} = "DT" then
//Problem not sorted properly.
cstr({OppReport.OppDate})
else if {?orderByPrm} = "CP" then
{OppReport.CustomerProspectName}
else if {?orderByPrm} = "OP" then
{OppReport.OpportunityName}
else if {?orderByPrm} = "SR" then
cstr({OppReport.SelectedRevenue})
else if {?orderByPrm} = "VO" then
cstr({OppReport.TotalValueOfRelatedProjectsAndSalesOrders})
//Problem not sorted properly.
else if {?orderByPrm} = "FB" then
cstr({@bestOFR}) //Problem not sorted properly.
else if {?orderByPrm} = "FW" then
cstr({@worstOFR}) //Problem not sorted properly.
else if {?orderByPrm} = "FM" then
cstr({@likelyOFR}) //Problem not sorted properly.
else if {?orderByPrm} = "NM" then
{OppReport.ResultOrNextMilestone}
else
""
So please tell me how i do the sorting no particular column
depnend upon report parameter.
Thanks Umesh Sharma,MCSD
India
I am doing sorting depend upon report parameter.
Example given below. For that i have written a formula @SortBy. But the problem is that a formula can return only one type value. But my report column are multiple types e.g. string , date, Number etc.
So if i convert date or number into string the sorting is not proper for date or number columns.
@SortBy Formula
if {?orderByPrm} = "DT" then
//Problem not sorted properly.
cstr({OppReport.OppDate})
else if {?orderByPrm} = "CP" then
{OppReport.CustomerProspectName}
else if {?orderByPrm} = "OP" then
{OppReport.OpportunityName}
else if {?orderByPrm} = "SR" then
cstr({OppReport.SelectedRevenue})
else if {?orderByPrm} = "VO" then
cstr({OppReport.TotalValueOfRelatedProjectsAndSalesOrders})
//Problem not sorted properly.
else if {?orderByPrm} = "FB" then
cstr({@bestOFR}) //Problem not sorted properly.
else if {?orderByPrm} = "FW" then
cstr({@worstOFR}) //Problem not sorted properly.
else if {?orderByPrm} = "FM" then
cstr({@likelyOFR}) //Problem not sorted properly.
else if {?orderByPrm} = "NM" then
{OppReport.ResultOrNextMilestone}
else
""
So please tell me how i do the sorting no particular column
depnend upon report parameter.
Thanks Umesh Sharma,MCSD
India