How to set ppViewer.Busy property to False after clicking on Cancel button of the cancel dialog when printing to the printer or to any device? Which method should be called?
Calling TppDevice.CancelJob will result in the TppViewer.Busy property to return False. Busy is also set to False once the device is done printing when the TppDevice.EndJob method is called.
Comments
Calling TppDevice.CancelJob will result in the TppViewer.Busy property to
return False. Busy is also set to False once the device is done printing
when the TppDevice.EndJob method is called.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I still have a problem. In my code:
ppViewer.Report := myReport;
ppViewer.Report.DeviceType := 'PDFFile';
ppViewer.Report.Print;
procedure TMyForm.myReportCancel(Sender: TObject); var lDevice: TppDevice;
begin // 1st way
lDevice := ppViewer.Report.DeviceClass.Create(nil);
lDevice.Publisher := ppViewer.Report.Publisher; ??????
lDevice.CancelJob;
lDevice.Free;
// 2nd way
ppViewer.Report.PrinterDevice.CancelJob;
end;
No one of these ways setup ppViewer.Busy to True
Any recommendations ?
Regards,
Michael