Sum in Header

okioki
edited 8:22AM in FastReport 4.0

When I run a report in the Pantheon for the first time does not appear to me SUM in header and if I close my report and start again shows SUM in header. Could be a problem GetGlobalVariable(), if I put only Get(), I get error "Unknown variable or datafield"..

procedure GroupFooter1OnBeforePrint(Sender: TfrxComponent);
begin
SetGlobalVariable(<qReportIzpis."acCostDrv">,
FloatToStr(<SUM(<qReportIzpis."anStockPrice"> * <qReportIzpis."anQty">,Detail)>));

procedure PoslDogHeaderOnBeforePrint(Sender: TfrxComponent);
begin
if Engine.FinalPass then
Memo5.Text :=vartostr( GetGlobalVariable(<qReportIzpis."acCostDrv">));
end;

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 8:22AM
    report must be set to two pass
    see sample in the main demo under dialogs and script
    totals in group header.
  • okioki
    edited 8:22AM
    OK,

    Thank you..

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.