Announcements
 Crystal Reports Forum : General Information : Announcements
Message Icon Topic: convert parameter into a single formula Post Reply Post New Topic
Author Message
joenellagz
Newbie
Newbie


Joined: 10 Feb 2009
Location: Philippines
Online Status: Offline
Posts: 2
Quote joenellagz Replybullet Topic: convert parameter into a single formula
    Posted: 21 May 2009 at 1:53am
 
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}

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.