I have this and it works right:
if ([RepArtRet] = '1') and [QrSub."RET"]=0 then
M2VANZAHL.Text := STR([QrSub."ANZAHL"])+'-'+STR([QrSub."RET"])
else
M2VANZAHL.Text := STR([QrSub."ANZAHL"]);
1)
When I put this:
[QrSub."RET"]=0
in parenthesis like this:
([QrSub."RET"]=0)
then the script returns second line every time.
2)
And when I remove the parantheses from:
([RepArtRet] = '1')
to
[RepArtRet] = '1'
then the script result changes but the variable [RepArtRet] is never changed it is all time 1.
3)
Whe I change the variable [RepArtRet] value to 0 then the script gives the value from first line back but it should run the second line.
Does anyone know what is wrong with script above?