Sum() raise an error..

TGDTGD
edited 3:56AM 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 3:56AM
    Use extra quotes:

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

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

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.