Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

how can i know if a report was printed??

edited January 2002 in General
Hi,

I need to kow if a report was printed from the print preview, so i can
launch a different report afterwards.
Is is possible? What are the alternatives?

Please reply to the email below also
eduardo@superkit.net

TIA,
Eduardo Gomes
Insurance Solutions

Comments

  • edited January 2002

    ------------------------------------------
    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;

    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com

    --
    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.