I use Fastreport 4. I need to print directly to the printer without showing Print Dialog. I've unchecked the ShowDialog in the Print Options, but it keep showing a print dialog. Any help would be very appreciated.
Asked
Active
Viewed 2.5k times
3 Answers
17
You should set it after loading report.
Report.LoadFromFile('filename');
Report.PrepareReport;
Report.PrintOptions.ShowDialog := False;
Report.Print;

Den
- 171
- 2
-
ShowDialog can also be set at designi time on the report itself – dandfra Jun 06 '22 at 12:51
-1
If you assign a fake string to "OnRunDialogs" event after loading report below like, your dialogs do not open.
frxMyReport.LoadFromFile(fPath); frxMyReport.OnRunDialogs ="fakeevent";
-1
Report report = new Report();
report.Load(@"C:\Something.frx");
# ... <rest-of-your-code>
report.PrintSettings.ShowDialog = false;
report.Print();

cccnrc
- 1,195
- 11
- 27