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

Silently print report

This is a bit of variation on a previously solved problem, which works in the more complex situation of multiple reports to a combined PDF. But if I want to print a basic report silently, it mostly works fine by quietly sending it to a PDF, like this:

ppReport1.PDFSettings.OpenPDFFile:= False;
ppReport1.TextFileName:= MyDir + '\RecentTrendReport.PDF';
ppReport1.ShowPrintDialog:= False;
ppReport1.Devicetype:= dtPDF;
ppReport1.Print;
Close;

EXCEPT that it is a bit confusing to the user, especially for longer reports, when they see a soon to disappear dialog saying "Printing to page 1", "Printing to Page 2", etc. Then all disappears, and indeed the silent report has been completed as desired. For this case, it is better if the user does not even know the report is being made.

Thanks, Scott

Comments

Sign In or Register to comment.