PageFooter Question

edited 12:20AM in FastReport 4.0
Happy New Year to the Fast Report team!

A little question for you. I want a footer to only print on the last page of a report. So I set:

PrintOnFirstPage := false
PrintOnLastPage := true

If I have a report with 2+ pages it's fine but if the report is only 1 page I get no footer. I assume the first page overrides the last page?

There doesn't seem to be any way of only having a footer on the last page? Did I miss something?

Thanks
Mark

Comments

  • edited January 2007
    Two ways I could think to do this:
    - Use a ReportSummary in place of PageFooter;
    - Use a script on the OnBeforePrint of the PageFooter to check if this is the last page. Something like that:
    Begin
        PageFooter1.Visible := <Page#> = <TotalPages#>
    End;
    

    Best Regards.
  • edited 12:20AM
    Thanks. I think the second will work ;)

    Doesn't seem to be many sightings of the FR team on the forum since New Year. They must have one big hang over! ;)
  • edited January 2007
    Just for curiosity: Why doesn't the ReportSummary works on this case?
    wrote:
    Doesn't seem to be many sightings of the FR team on the forum since New Year. They must have one big hang over!
    Apparently, there are only few ones that take care of the forum. I can only remember 3 names, and one of them, is AlexTZ, who is also the main developer. So that he may not have much time to spend here.

    However, they seem to post more frequently on the newsgroup. You should check it out.

    Regards.
  • edited 12:20AM
    I have the same problem. But I cannot use PageFooter because I use it for something else. So I try to use the ReportSummary band.

    But there is a big (for me at last) problem. The band is printed at next white space. I really need it to be printed at the bottom of the page! ;)

    Any help appreciated!

  • gordkgordk St.Catherines On. Canada.
    edited 12:20AM
    procedure ReportSummary1OnBeforePrint(Sender: TfrxComponent);
    begin
    if engine.freespace > reportsummary1.height then
    begin
    Engine.CurY := Engine.PageHeight -reportsummary1.height -pagefooter1.Height - 1;

    end;
    end;
    or if the band is stretchable
    procedure ReportSummary1OnAfterCalcHeight(Sender: TfrxComponent);

    begin
    Engine.CurY := Engine.PageHeight -reportsummary1.height -pagefooter1.Height - 1;
    end;
  • edited 12:20AM
    gordk wrote: »
    procedure ReportSummary1OnBeforePrint(Sender: TfrxComponent);
    begin
    if engine.freespace > reportsummary1.height then
    begin
    Engine.CurY := Engine.PageHeight -reportsummary1.height -pagefooter1.Height - 1;

    end;
    end;
    or if the band is stretchable
    procedure ReportSummary1OnAfterCalcHeight(Sender: TfrxComponent);

    begin
    Engine.CurY := Engine.PageHeight -reportsummary1.height -pagefooter1.Height - 1;
    end;
    thanks man..it's work

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.