Report totals on a multipage Sales Order/Invoice
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.
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
Take a look at this topic, it might give you a few ideas:
http://www.fast-report.com/en/forum/?p=/discussion/5789
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.
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:
Thanks again,
Regards,
PhilW.