I have this formula. It's pretty straight forward, but Crystal is telling me that I need a closed parenthesis and is highlighting the word "else" in line nine.
I know one doesn't need to go there. I'm thinking I have a syntax error. If you need any more info about the fields, let me know.
Basically, it looks at DROPP and depending on what it says, it looks at ADDP, and then DROPC and then ADDC. There are possibilities that the fields could contain information not in the formula, and in that case, the output should be zero.
I know one doesn't need to go there. I'm thinking I have a syntax error. If you need any more info about the fields, let me know.
Basically, it looks at DROPP and depending on what it says, it looks at ADDP, and then DROPC and then ADDC. There are possibilities that the fields could contain information not in the formula, and in that case, the output should be zero.
Code:
if isnull({Command.DROPP}) then
(if {Command.ADDP} = "001" then
(if isnull({Command.DROPC}) then
(if isnull({Command.ADDC}) then 10 else
if {Command.ADDC} = "BD3" then 35 else 0)
else 0) else
(if {Command.DROPC} = "B1" then
(if {Command.ADDC} = "BD3" then 30 else 0)
else 0) else
(if {Command.DROPC} = "B2" then
(if {Command.ADDC} = "BD3" then 30 else 0)
else 0) else
(if {Command.DROPC} = "B3" then
(if {Command.ADDC} = "BD3" then 10 else 0)
else 0) else
(if {Command.DROPC} = "BD1" then
(if {Command.ADDC} = "BD3" then 30 else 0)
else 0) else
(if {Command.DROPC} = "BD2" then
(if {Command.ADDC} = "BD3" then 30 else 0)
else 0) else
0) else
(if {Command.ADDP} = "002" then
(if isnull({Command.DROPC}) then
(if isnull({Command.ADDC}) then 10 else
if {Command.ADDC} = "BD3" then 35 else 0)
else 0) else
(if {Command.DROPC} = "B1" then
(if {Command.ADDC} = "BD3" then 30 else 0)
else 0) else
(if {Command.DROPC} = "B2" then
(if {Command.ADDC} = "BD3" then 30 else 0)
else 0) else
(if {Command.DROPC} = "B3" then
(if {Command.ADDC} = "BD3" then 10 else 0)
else 0) else
(if {Command.DROPC} = "BD1" then
(if {Command.ADDC} = "BD3" then 30 else 0)
else 0) else
(if {Command.DROPC} = "BD2" then
(if {Command.ADDC} = "BD3" then 30 else 0)
else 0) else
0) else
(if {Command.ADDP} = "003" then
(if isnull({Command.DROPC}) then
(if isnull({Command.ADDC}) then 5 else
if {Command.ADDC} = "BD3" then 25 else 0)
else 0) else
(if {Command.DROPC} = "B1" then
(if {Command.ADDC} = "BD3" then 25 else 0)
else 0) else
(if {Command.DROPC} = "B2" then
(if {Command.ADDC} = "BD3" then 25 else 0)
else 0) else
(if {Command.DROPC} = "B3" then
(if {Command.ADDC} = "BD3" then 5 else 0)
else 0) else
(if {Command.DROPC} = "BD1" then
(if {Command.ADDC} = "BD3" then 25 else 0)
else 0) else
(if {Command.DROPC} = "BD2" then
(if {Command.ADDC} = "BD3" then 25 else 0)
else 0) else
0) else 0) else
(if {Command.DROPP} = "003" then
(if {Command.ADDP} = "001" then 5 else
if {Command.ADDP} = "002" then 5) else 0)