Report Summary at Bottom of Last Page

edited 6:22AM in FastReport 4.0
Hi,

I have a report that sometimes will span more than one page.

When the report spans more than one page I want the Report Summary to display at the bottom of the last page of the report.

In my attached examples I have the following:

Report1.fp3 shows the output if I have the following code in the Report Summary On After Calc Hight
procedure ReportSummary1OnAfterCalcHeight(Sender: TfrxComponent);
begin
  Engine.CurY := Engine.PageHeight - reportsummary1.height - pagefooter1.Height - 1;
end;

If I change that code to the following:
procedure ReportSummary1OnAfterCalcHeight(Sender: TfrxComponent);
begin
  if engine.freespace > reportsummary1.height then
    begin
      Engine.CurY := Engine.PageHeight - reportsummary1.height - pagefooter1.Height - 1;                                      
    end;              
end;

the report results in the output as shown in Report2

In this particular scenario I want the summary as printed on page 2 at the top, to be placed at the bottom of the report.

Much appreciated if someone can give me some pointers.

Regards
Marius

Delphi 2007 Professional
Fast Report 4.15.9



Comments

  • gpigpi
    edited July 2014
    procedure ReportSummary1OnAfterCalcHeight(Sender: TfrxComponent);
    begin
        if Engine.FreeSpace < ReportSummary1.Height then Engine.NewPage;
        Engine.CurY := Engine.CurY + Engine.FreeSpace - ReportSummary1.Height - 0.000001;
    end;
    

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.