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

How to set ppViewer.Busy to False

edited March 2004 in General
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?

Thank's in advance

Michael

Comments

  • edited March 2004
    Hi Michael,

    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.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2004
    Hi Nico,

    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



This discussion has been closed.