Report Printed

Hello

how can I find out that my report was printed (at this instance)?

Maybe as a property:
if oFReport.IsPrinted = true then
...

or is a special event available?

I saw many other topics like this from other users...
Is a solution available or in one of the next releases?

Best regards,
Stefan

Comments

  • edited 4:20PM
    Hello,

    Report is considered printed when you press the OK button in the print dialog.
    Use the following code if you want to show the "Print" dialog, then print:
    report.Load(...);
    if (report.Prepare())
    {
      PrinterSettings printerSettings = null;
      if (report.ShowPrintDialog(out printerSettings))
      {
         report.PrintPrepared(printerSettings);
         // at this point, the report is printed.
      }
    }
    
  • edited 4:20PM
    Hello,

    thank you for your response.
    I will implement and test it.

    Best regards,
    Stefan Drwes
  • edited 4:20PM
    Hello AlexTZ,

    your solution works pretty good, but I wanna use the default print preview.
    Is it possible there?
    I don't wanna create a new one... >
  • edited 4:20PM
    Hello,

    I will add the ReportPrinted event in the next daily build (tomorrow). You will be able to use it as follows:

    using FastReport.Utils;

    Config.ReportSettings.ReportPrinted += new EventHandler(Report_Printed);
  • edited 4:20PM
    Hello AlexTZ,

    perfect - thank you very much!

    Best regards,
    Stefan Drews

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.