Click to See Complete Forum and Search --> : Why does Crystal think Number is a boolean?


pj19
May 11th, 2006, 10:29 AM
Here is a forumula in my report. @CurrentSupplierType is an integer from 1-5. Check the line with the arrow pointing to it.

shared Numbervar DL1;
shared Numbervar DL2;
shared Numbervar DL3;
shared Numbervar DL4;
shared Numbervar DL5;
shared Numbervar DL6;
shared Numbervar DL7;
if {@CurrentSupplierType}=1 then
(DL1:=.1 and
Dl2:=.25 and
DL3:=.5 and
DL4:=2 and
DL5:=1.5 and
DL6:=2 and <-----------
DL7:=3)
else if {@CurrentSupplierType}=2 then
(DL1:=.1 and
Dl2:=.25 and
DL3:=.5 and
DL4:=1 and
DL5:=1.5 and
DL6:=2 and
DL7:=3)
else if {@CurrentSupplierType}=3 then
(DL1:=.1 and
Dl2:=.25 and
DL3:=.5 and
DL4:=1 and
DL5:=1.5 and
DL6:=2 and
DL7:=3)
else if {@CurrentSupplierType}=4 then
(DL1:=.1 and
Dl2:=.25 and
DL3:=.5 and
DL4:=1 and
DL5:=1.5 and
DL6:=2 and
DL7:=3)
else if {@CurrentSupplierType}=5 then
(DL1:=.1 and
Dl2:=.25 and
DL3:=.5 and
DL4:=1 and
DL5:=1.5 and
DL6:=2 and
DL7:=3)

This line always come up with an error saying that the number 2 should be a boolean variable? Am I doing something wrong here? If I change it to a 1, the same error comes up. If i change a prior line assignment value to a 2, the same line comes up with an error. It seems no matter what I do, that line has the same boolean error. Can someone help me please???

pj19
May 12th, 2006, 09:47 AM
Anyone? anyone?

pj19
May 12th, 2006, 04:27 PM
Problem fixed! Had to replace the "and"s with ";" Thanks anyway guys!