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

Close Preview after Print Button Click

edited October 2003 in General
Is it possible to close the preview after the 'print' button on the preview
screen has been clicked instead of also having to click 'close'?

I'm printing several documents from a dataset and it's a pain to have to
click print and close every time. They do need to see the preview so they
can decide to print the document or not so I can't just send it straight to
the printer.

D6/RB6.03

Thanks

Bobby
--

Comments

  • edited October 2003
    Hi Bobby,

    Try placing Report.PreviewForm.Close inside the Report.OnPrintingComplete
    event. This will close the preview form after you print.


    procedure TForm1.ReportPrintingComplete(Sender: TObject);
    begin
    Report.PreviewForm.Close;
    end;

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2003
    that's what I needed.

    Thanks

    --

This discussion has been closed.