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

Printpreview problem

edited September 2006 in General
Hi all.

I know i have seen this Q b4 inhere but i can't find it :(
Soo here it come again :)

Is there anyway to check if the page has been printed or 'just' showen on
the screen, becos my problem is i add a 'flag' in my Database when a report
is printed, but this flag is set allso when i just show the report on the
screen, and that i don't want :)

Regards
Brian

Sorry for my english, hobe you will know what i meen

Comments

  • edited September 2006

    The following is from the Printer thread of the tech tips newsgroup.

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


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.