Report totals on a multipage Sales Order/Invoice

edited 6:07PM in FastReport 4.0
Hello,

I am designing a report for a Sales Order and Invoice which has the header information at the top of the page and the totals at a fixed position at the bottom of the page.

With a single page order, using a PageFooter for the totals is great.

However, for a multipage order, I am stuck because (1) using a PageFooter means that totals are printed at the bottom of every page (not good) and (2) using a Footer means that totals are printed only on the last page but directly after the last record and not at the bottom of the page (better, but still no good).

Having had a good look though the report demos, and not seeing a report for sales orders or invoices, I am a bit worried that FastReport cannot do it.

Any advice?
Thanks,
PhilW.

Comments

  • Anu de DeusAnu de Deus Hampshire, UK
    edited 6:07PM
    Use the pagefooter, but you must control the situation when you want it visible and when you don't want it visible.
    Take a look at this topic, it might give you a few ideas:
    http://www.fast-report.com/en/forum/?p=/discussion/5789
  • gordkgordk St.Catherines On. Canada.
    edited 6:07PM
    "that totals are printed only on the last page but directly after the last record and not at the bottom of the page (better, but still no good)."

    control the footers position from its obp event, using the engine object.
    if engine.freespace > footername.height then
    Engine.CurY := Engine.PageHeight -footername.height -pagefooter1.Height - 1;
    end;
    -pagefooter1.height is optional if you are also using the page footer for other info.

    master detail subdetail demo report, nested group report
    the demos are basic it is up to you to adapt the concepts to suit your situation.
  • edited 6:07PM
    Hi,

    Thanks for the quick response.

    This is good stuff; and works well. Just to let other forum members know what I tried:
    (1) Set the report to double-pass (menu Report|Options, General tab)
    (2) Created an OnBeforePrint event for the PageFooter
    (3) Added the code:
    procedure PageFooter1OnBeforePrint(Sender: TfrxComponent);
    begin
        if <Page> < <TotalPages>  
        then PageFooter1.Visible := False                                                                           
        else PageFooter1.Visible := True;                                                                           
    end;
    

    Thanks again,
    Regards,
    PhilW.

    Use the pagefooter, but you must control the situation when you want it visible and when you don't want it visible.
    Take a look at this topic, it might give you a few ideas:
    http://www.fast-report.com/en/forum/?p=/discussion/5789

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.