VCL Report Report Summary
Hi all,
Hopefully some one can guide me in the right direction - I have a Delivery Advice - It has a Report Title / a Page Header / Master Data and a Report Summary, my issue is that I need to print the Report Summary at the BOTTOM of the last page. there could be 4 rows of data or 40 , all depends on the delivery
I have tried using a Page footer and set it to PrintonLastPage it prints on all pages but the first ? - curious behavior, I'm just not quite sure how to go about achieving the result - Any guidance would be appreciated
Thanks ALL in advance
Trevor Chant
Hopefully some one can guide me in the right direction - I have a Delivery Advice - It has a Report Title / a Page Header / Master Data and a Report Summary, my issue is that I need to print the Report Summary at the BOTTOM of the last page. there could be 4 rows of data or 40 , all depends on the delivery
I have tried using a Page footer and set it to PrintonLastPage it prints on all pages but the first ? - curious behavior, I'm just not quite sure how to go about achieving the result - Any guidance would be appreciated
Thanks ALL in advance
Trevor Chant
Comments
begin
if engine.freespace > reportsummary1.height then
begin
Engine.CurY := Engine.PageHeight -reportsummary1.height -pagefooter1.Height - 1;
end;
end;
OR IF SMMARY BAND IS STRETCHING DO IT HERE
procedure ReportSummary1OnAfterCalcHeight(Sender: TfrxComponent);
begin
Engine.CurY := Engine.PageHeight -reportsummary1.height -pagefooter1.Height - 1;
end;
tip
overlay is a bit of a misnomer it is more like an underlay
create your report first make sure designer is set to use large height in design mode.
add the overlay band after all other bands or it gets messy designing the page.
draw your lines in the overlay the top of the overlay is the top of the out put page
I appreciate the help - this is a little new to me and I'm learning - fast - I now have the finished product - great too FastReports !
gordk kindly showed some code to always position the Report summary at the bottom of a page, I have a question about this if the data stops at less than the Summary.Height and there is only one page of data , I would still like the Summary to be on the bottom of page two, What is happening is the CurY value seems to be at the top of page two - Do I need to add another page ? - The code below is not correct , any help would be appreciated
if engine.freespace > reportsummary1.height then
Engine.CurY := Engine.PageHeight - lvBottSpace - 1
else
Engine.CurY := (Engine.PageHeight + engine.freespace) - lvBottSpace - 1;
Regards
procedure ReportSummary1OnAfterCalcHeight(Sender: TfrxComponent);
begin
if Engine.FreeSpace < ReportSummary1.Height then Engine.NewPage;
Engine.CurY := Engine.CurY + Engine.FreeSpace - ReportSummary1.Height - 0.000001;
end;