You do not know whether the band is the last one on the page until the page is completed. You could perhaps use the DetailBand.AfterPrint to store information about the latest detail band that has printed on the page and then in the Report.OnEndPage event you would know that the band is the last on the page.
Here is a Delphi code example of drawing a line after the last detail band on each page...
www.digital-metaphors.com/tips/LasDetailLine.zip
--
Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the Delphi Informant Readers Choice awards!
It is not known whether a given Page is the last page until after the report engine generates the page and sends it to the report's publisher (which in turn sends the page to the device).
There is an Engine.AfterSendPage event. I tried the following and that seemed to work:
procedure TForm1.FormCreate(Sender: TObject); begin ppReport1.Engine.AfterSendPage := ehAfterSendPage; end;
procedure TForm1.ehAfterSendPage(Sender: TObject); begin if ppReport1.Engine.Page.LastPage then messagebeep(0);
end;
--
Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the Delphi Informant Readers Choice awards!
Comments
You do not know whether the band is the last one on the page until the page
is completed. You could perhaps use the DetailBand.AfterPrint to store
information about the latest detail band that has printed on the page and
then in the Report.OnEndPage event you would know that the band is the last
on the page.
Here is a Delphi code example of drawing a line after the last detail band
on each page...
www.digital-metaphors.com/tips/LasDetailLine.zip
--
Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
Delphi Informant Readers Choice awards!
http://www.delphizine.com/ballot2004/
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Thanks for the answer, but is it possible to know if the page is the last
page or not?
Best Regards,
William
It is not known whether a given Page is the last page until after the report
engine generates the page and sends it to the report's publisher (which in
turn sends the page to the device).
There is an Engine.AfterSendPage event. I tried the following and that
seemed to work:
procedure TForm1.FormCreate(Sender: TObject);
begin
ppReport1.Engine.AfterSendPage := ehAfterSendPage;
end;
procedure TForm1.ehAfterSendPage(Sender: TObject);
begin
if ppReport1.Engine.Page.LastPage then
messagebeep(0);
end;
--
Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
Delphi Informant Readers Choice awards!
http://www.delphizine.com/ballot2004/
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Thanks a lot.
William