Sum() raise an error..

TGDTGD
edited 9:16PM in FastReport 3.0
In:

procedure GroupFooter1OnBeforePrint(Sender: TfrxComponent);
begin
with GroupFooter1, Engine do
begin
if <DS1."CODMAS"> = '' + '01' + '' then
begin
Memo22.Text := 'Attivit?  :';

Set('AttDap', FloatToStr(<Sum(<DS1."IMPDAP">, MasterData1)>));
Set('AttAap', FloatToStr(<Sum(<DS1."IMPAAP">, MasterData1)>));
Set('AttDac', FloatToStr(<Sum(<DS1."IMPDAC">, MasterData1)>));
Set('AttAac', FloatToStr(<Sum(<DS1."IMPAAC">, MasterData1)>));
end;


In report a memo item is added and valorized with brachets expression
e.g. [AttDap] and numeric formattef text. (??¬ 1,234.5)

but error occuors in preview:

"Memo31 expression error '432,29': ';' expected"

what's wrong?

thanx and merry xmass to everybody




Comments

  • edited 9:16PM
    Use extra quotes:

    Set('AttDap', '''' + FloatToStr(<Sum(<DS1."IMPDAP">, MasterData1)>) + '''');
  • TGDTGD
    edited 9:16PM
    AlexTZ wrote:
    Use extra quotes:

    Set('AttDap', '''' + FloatToStr(<Sum(<DS1."IMPDAP">, MasterData1)>) + '''');
    Many Thanx alex ;)

Leave a Comment