Richard Cooper
asked on
Crystal Variable Problem
I have to update several shared variables based on the scrap code:
I get an error after this line M99:= M99 + {bsp_Quality.Qty}; stating the rest of the text is not part of the formula.
What am I missing?
if {bsp_Quality.FaultCode}="99" then
M99:= M99 + {bsp_Quality.Qty};
TotalScrapM99:= TotalScrapM99 + {bsp_Quality.Qty};
TotalMatScrap:={bsp_Quality.Shot}*{bsp_Quality.Qty};
else if {bsp_Quality.FaultCode}="M01" then ...
I get an error after this line M99:= M99 + {bsp_Quality.Qty}; stating the rest of the text is not part of the formula.
What am I missing?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The syntax for such code is a bit difficult.
Remove the ; on the line before the )
In your Else structure you need ...
else
(
firstline;
secondline;
thirdline
);
Remove the ; on the line before the )
In your Else structure you need ...
else
(
firstline;
secondline;
thirdline
);
What is the full code?
The variables don't appear to be declared.
All variables used in a formula must be declared in the formula.
Unlike some languages you must declare the variable in each formula not just in a formula at the start of the report.
mlmcc
The variables don't appear to be declared.
All variables used in a formula must be declared in the formula.
Unlike some languages you must declare the variable in each formula not just in a formula at the start of the report.
mlmcc
ASKER
The Variable TotalMatScrap was not declared correctly.
Since you had to change the declaration, why wasn't my comment selected as part of the answer. The ( ) being required was part of the answer though not to the actual error.
mlmcc
mlmcc
ASKER
mlmcc,
There was a typo in the variable. It had been declared, I checked the code before I read your post. Even without the typo the error was the same no ( )
Sorry.
There was a typo in the variable. It had been declared, I checked the code before I read your post. Even without the typo the error was the same no ( )
Sorry.
ASKER