Recent

Author Topic: Scripts  (Read 15491 times)

adilsonpazzini

  • New Member
  • *
  • Posts: 25
Re: Scripts
« Reply #15 on: August 09, 2018, 04:09:00 pm »
Reading the link http://wiki.freepascal.org/LazReport_Documentation#Script  in part Logical/boolean functions

IF(<X>, <Y>, <Z>)
    Returns < Y > if expression < X > is true. If false, returns < Z >.

I need to do something like this IF(["TABLE".FIELDVALUE1>0,"TABLE".FIELDVALUE,0]) .

Has anyone ever had to do something like this?

Thanks in advance .

Adilson

korba812

  • Full Member
  • ***
  • Posts: 109
Re: Scripts
« Reply #16 on: August 09, 2018, 04:39:59 pm »
You should use parentheses:
IF([["TABLE".FIELDVALUE1]>0,["TABLE".FIELDVALUE],0])
(my mistake)

IF(["TABLE".FIELDVALUE1]>0,["TABLE".FIELDVALUE],0)
« Last Edit: August 09, 2018, 04:42:21 pm by korba812 »

adilsonpazzini

  • New Member
  • *
  • Posts: 25
Re: Scripts
« Reply #17 on: August 09, 2018, 06:47:59 pm »
I tried even harder not to. Am I doing something wrong?

Thanks for the feedback .

korba812

  • Full Member
  • ***
  • Posts: 109
Re: Scripts
« Reply #18 on: August 09, 2018, 08:39:53 pm »
whole statement also must be in parentheses:
[IF(["TABLE".FIELDVALUE1]>0,["TABLE".FIELDVALUE],0)]

adilsonpazzini

  • New Member
  • *
  • Posts: 25
Re: Scripts
« Reply #19 on: August 09, 2018, 08:57:14 pm »
worked thank you very much

Adilson Pazzini