Know if printed to printer
Is it possible to know when something has actually been printed? When
using a TppReport it's OK, I can use the OnPrintingComplete event, but I'm
using a TppArchiveReader which doesn't have one. I'm also using a bespoke
TppPrintPreview, so I'm using the Archive Reader to print to screen, then
using the preview screen to print to the actual printer (showing the print
dialog) or exporting to other formats like PDF.
What I want to do is to know that either an export has been created or
it's been sent to a printer, IOW the user didn't click print but cancel on
the print dialog.
Any help appreciated.
--
Jeremy Knowles
using a TppReport it's OK, I can use the OnPrintingComplete event, but I'm
using a TppArchiveReader which doesn't have one. I'm also using a bespoke
TppPrintPreview, so I'm using the Archive Reader to print to screen, then
using the preview screen to print to the actual printer (showing the print
dialog) or exporting to other formats like PDF.
What I want to do is to know that either an export has been created or
it's been sent to a printer, IOW the user didn't click print but cancel on
the print dialog.
Any help appreciated.
--
Jeremy Knowles
This discussion has been closed.
Comments
Take a look at the following article. You can use the OnPrintDialogClose
event of the ArchiveReader to determine whether the user printed or selected
to cancel.
------------------------------------------
Tech Tip: Detecting whether PrintDialog's
Cancel button was Selected
------------------------------------------
When the print dialog is displayed to the user, you can determine whether
the Cancel button was selected by using the Report.OnPrintDialogClose event.
Example:
procedure TForm1.ppReport1PrintDialogClose(Sender: TObject);
begin
if ppReport1.PrintDialog.ModalResult = mrCancel then
ShowMessage('Use chose to cancel the print request');
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
"Jeremy Knowles"
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Perfect, thanks Nico. I even looked through the tips and missed this.
Thanks for the help,
--
Jeremy Knowles