How can I Know if a user prints a report in printer or in screen... because
an user can preview the report and not print it.
--
Un saludo
Jaime Lloret.
www.iscopyme.com
Administraci?n : admin@iscopyme.com
Depto. Software : soft@iscopyme.com
SAT : sat@iscopyme.com
Comments
Tech Tip: Detecting whether Report was
Printed to the Printer
------------------------------------------
The Report.AfterPrint event can be used to
determine whether the report was printed
to the printer (rather than preview, ...).
Example:
procedure TForm1.ppReport1AfterPrint(Sender: TObject);
begin
if (ppReport1.PrinterDevice <> nil) then
ShowMessage('Report was printed to the printer');
end;
Note: If the user cancels the report while it
is running, then the Report.OnCancel event will
fire, followed by the Report.AfterPrint event.
Example:
procedure TForm1.ppReport1Cancel(Sender: TObject);
begin
ShowMessage('Printing cancelled by user');
end;
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com