hi i am working with item valuation report and there is a cost conversion on the old report that we are using i want to convert the parameter into a single formula i want to simplify the report and there is an cost conversion can u help to solve this problem ({?VALU1}) is a parameter i want to simplify this syntax into a single many thanks
NumberVar valu := ToNumber({?VALU1});
IF valu = 1 then {ICIVAL.TRANSCOST}
else if valu = 2 then if {ICIVAL.COSTCONV} <> 0 then {ICIVAL.RECENTCOST}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}/{ICIVAL.COSTCONV} else {ICIVAL.RECENTCOST}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}
else if valu = 3 then if {ICIVAL.COSTCONV} <> 0 then {ICIVAL.STDCOST}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}/{ICIVAL.COSTCONV} else {ICIVAL.STDCOST}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}
else if valu = 4 then if {ICIVAL.COSTCONV} <> 0 then {ICIVAL.COST1}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}/{ICIVAL.COSTCONV} else {ICIVAL.COST1}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}
else if valu = 5 then if {ICIVAL.COSTCONV} <> 0 then {ICIVAL.COST2}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}/{ICIVAL.COSTCONV} else {ICIVAL.COST2}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}
else if valu = 6 then if {ICIVAL.COSTCONV} <> 0 then {ICIVAL.OPTAMT}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}/{ICIVAL.COSTCONV} else {ICIVAL.OPTAMT}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}
else if valu = 7 then if {ICIVAL.CONVERSION} <> 0 then {ICIVAL.OPTAMT}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}/{ICIVAL.CONVERSION} else {ICIVAL.OPTAMT}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}
else if valu = 8 then if {ICIVAL.COSTCONV} <> 0 then {ICIVAL.LASTCOST}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}/{ICIVAL.COSTCONV} else {ICIVAL.LASTCOST}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}
else if {ICIVAL.BASECONV} <> 0 then {ICIVAL.BASEPRICE}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}/{ICIVAL.BASECONV} else {ICIVAL.BASEPRICE}*{ICIVAL.QUANTITY}*{ICIVAL.CONVERSION}