how Report.DonePrinting works ?
Hi guys,
I have a situation when I need to avoid printing the last page.
I do the following on Report.onEndPage event handler:
if FSendInvoice and // my condition
(MyReport.FirstPass = False) and // to make AbsolutePageCount work I set
twoPass option
(MyReport.AbsolutePageNo = SICRep.AbsolutePageCount-1) // second last
page
then
MyReport.DonePrinting := true;
But it doesn't work. Am I missing something ?
Thanks,
Dmitry
I have a situation when I need to avoid printing the last page.
I do the following on Report.onEndPage event handler:
if FSendInvoice and // my condition
(MyReport.FirstPass = False) and // to make AbsolutePageCount work I set
twoPass option
(MyReport.AbsolutePageNo = SICRep.AbsolutePageCount-1) // second last
page
then
MyReport.DonePrinting := true;
But it doesn't work. Am I missing something ?
Thanks,
Dmitry
This discussion has been closed.
Comments
The DonePrinting property is primarily used internally to let the report
component know when it needs to cancel the print job. Try using the
Report.Cancel routine instead and see if that works better for you.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
it works just as I wanted it to !!!