* * *

Author Topic: [solved]Strange error in lazreport-scripting  (Read 139 times)

Soner A.

  • Full Member
  • ***
  • Posts: 177
    • My Blog
[solved]Strange error in lazreport-scripting
« on: August 11, 2017, 01:11:38 pm »
I have this and it works right:
Quote
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?
« Last Edit: August 11, 2017, 02:17:57 pm by Soner A. »
I use latest Lazarus version with fixes-svn, fpc latest official, Windows 7, All 32Bit

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus