Closing preview screen after print

Hi,

A number of my users like to preview a report or form before printing. No problem there, and probably a good habit to get into.

However, the phone rings, they get distracted and forget if they have printed the report or form. So, the report or form gets printed twice or not at all and confusion reigns.

Is it possible to set up the Preview screen so that after the print the screen closes?

Could the frxReport event OnReportPrint be the place to add some code to close the preview screen?; and if so what would the code be?

Thanks for any advice,
Regards,
PhilW.

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:49PM
    yes
    ie
    procedure TForm1.frxReport1AfterPrintReport(Sender: TObject);
    begin
    frxreport1.PreviewForm.Close;
    end;
  • edited 4:49PM
    Hi, Gordk,

    Thanks! It works a treat.

    Regards,
    PhilW.
    gordk wrote: »
    yes
    ie
    procedure TForm1.frxReport1AfterPrintReport(Sender: TObject);
    begin
    frxreport1.PreviewForm.Close;
    end;

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.