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.
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
ie
procedure TForm1.frxReport1AfterPrintReport(Sender: TObject);
begin
frxreport1.PreviewForm.Close;
end;
Thanks! It works a treat.
Regards,
PhilW.