DoublePass DrillDown Report

edited 3:38PM in FastReport 4.0
Hi There,

I'm creating a drill down report and need to show some totals in the GroupHeader. Therefore I've set the Report Objects ->DoublePass true

The 4.6 User Manual Page page 100 states

PascalScript:
procedure GroupHeader1OnBeforePrint(Sender: TfrxComponent);
begin
if Engine.FinalPass then
Memo8.Text := 'Sum: ' + Get(<Group."CustNo">);
end;

procedure GroupFooter1OnBeforePrint(Sender: TfrxComponent);
begin
Set(<Group."CustNo">,
FloatToStr(SUM(<Group."ItemsTotal">,MasterData1)));
end;

begin
end.


I've followed this to the tee but my Memo only shows the totals when I expand the selection. Collapsed they show 0 which sort of defeats the purpose? Have I missed something?

Really appreciate any help

Mark

Comments

  • edited 3:38PM
    Kruger wrote: »
    Hi There,

    I'm creating a drill down report and need to show some totals in the GroupHeader. Therefore I've set the Report Objects ->DoublePass true

    The 4.6 User Manual Page page 100 states

    PascalScript:
    procedure GroupHeader1OnBeforePrint(Sender: TfrxComponent);
    begin
    if Engine.FinalPass then
    Memo8.Text := 'Sum: ' + Get(<Group."CustNo">);
    end;

    procedure GroupFooter1OnBeforePrint(Sender: TfrxComponent);
    begin
    Set(<Group."CustNo">,
    FloatToStr(SUM(<Group."ItemsTotal">,MasterData1)));
    end;

    begin
    end.


    I've followed this to the tee but my Memo only shows the totals when I expand the selection. Collapsed they show 0 which sort of defeats the purpose? Have I missed something?

    Really appreciate any help

    Mark


    Everyone stop looking [img]style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> I've found my problem. The Sum calculations needed the invisible flag set.[/img]

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.