Reputation: 71
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.
Upvotes: 7
Views: 27236
Reputation: 1
Report report = new Report();
report.Load(@"C:\Something.frx");
# ... <rest-of-your-code>
report.PrintSettings.ShowDialog = false;
report.Print();
Upvotes: -1
Reputation: 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";
Upvotes: -1
Reputation: 171
You should set it after loading report.
Report.LoadFromFile('filename');
Report.PrepareReport;
Report.PrintOptions.ShowDialog := False;
Report.Print;
Upvotes: 17