Recent

Author Topic: SUM(MAXNUM(...)) not working in script  (Read 1812 times)

AKCarlow

  • New Member
  • *
  • Posts: 45
SUM(MAXNUM(...)) not working in script
« on: February 10, 2015, 02:26:24 am »
In a Memo text on a MasterFooter band, this works:

[SUM(MAXNUM([qPrintBills."Fixed"],[qPrintBills."Fixed"]+[qPrintBills."Charge"]),MasterData1,1)]

In a Memo script on a MasterFooter band, this doesn't:

TheData := SUM(MAXNUM([qPrintBills."Fixed"],[qPrintBills."Fixed"]+[qPrintBills."Charge"]),MasterData1,1);

neither does this:

TheData := SUM([qPrintBills."Fixed"]+[qPrintBills."Charge"],MasterData1,1);

Should SUM work in a script?
Using: OS-X 10.6.8, Lazarus 1.2.4, FPC 2.6.4,  MySQL 5.6.19 (32-bit)

AKCarlow

  • New Member
  • *
  • Posts: 45
Re: SUM(MAXNUM(...)) not working in script
« Reply #1 on: February 10, 2015, 06:03:09 pm »
In the script, a space is need either side of the + to make it work!
Using: OS-X 10.6.8, Lazarus 1.2.4, FPC 2.6.4,  MySQL 5.6.19 (32-bit)