How to cancel preview if user clicks the print button
Hello,
i want to cancel the complete printjob, if the user clicks on the print
button in the preview window.
Special reports schould not be printed to the printer or exported to file.
Therefore i am looking for a method to do this. "Report.Cancel" does not
work in the "OnCreatePrintDialog" for this.
The method should work with RAP, because the behavoir to do this depends
only on special reports.
Any idea?
chris
EULANDA? Software
i want to cancel the complete printjob, if the user clicks on the print
button in the preview window.
Special reports schould not be printed to the printer or exported to file.
Therefore i am looking for a method to do this. "Report.Cancel" does not
work in the "OnCreatePrintDialog" for this.
The method should work with RAP, because the behavoir to do this depends
only on special reports.
Any idea?
chris
EULANDA? Software
This discussion has been closed.
Comments
Use the Report.OnPrintDialogClose event to set the ModalResult to 2 - this
is equivalent to mrCancel (mrCancel is not currently defined to the RAP
RTTI). I just tested this from RAP and it worked.
Report.PrintDialog.ModalResult := 2;
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com