Guest_imported
New member
- Jan 1, 1970
- 0
I have a formula using the following syntax. The formula works without any problems but I would like to know if this is the most efficient way of writing it: -
whileprintingrecords;
global numbervar var1:=
if {FLD1}=100 and {FLD2}="A" then var1 + {FLD3} else var1;
global numbervar var2:=
if {FLD1}=100 and {FLD2}="B" then var2 + {FLD3} else var2;
global numbervar var3:=
if {FLD1}=100 and {FLD2}="C" then var3 + {FLD3} else var3;
global numbervar var4:=
if {FLD1}=100 and {FLD2}="D" then var4 + {FLD3} else var4;
Is there anyway that I can make all four variable declarations at the top together and then write one statement below to make the calculations?
whileprintingrecords;
global numbervar var1:=
if {FLD1}=100 and {FLD2}="A" then var1 + {FLD3} else var1;
global numbervar var2:=
if {FLD1}=100 and {FLD2}="B" then var2 + {FLD3} else var2;
global numbervar var3:=
if {FLD1}=100 and {FLD2}="C" then var3 + {FLD3} else var3;
global numbervar var4:=
if {FLD1}=100 and {FLD2}="D" then var4 + {FLD3} else var4;
Is there anyway that I can make all four variable declarations at the top together and then write one statement below to make the calculations?