7

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.

Mohammed Nasman
  • 10,992
  • 7
  • 43
  • 68
Adi
  • 71
  • 1
  • 1
  • 2

3 Answers3

17

You should set it after loading report.

Report.LoadFromFile('filename');
Report.PrepareReport;
Report.PrintOptions.ShowDialog := False;
Report.Print;
Den
  • 171
  • 2
-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