OnReportPrint event is not always fired

edited July 2014 in FastReport VCL 5
When you use the designer and press F9 to test it then the OnReportPrint event will be fired after you've pressed the PRINT Button (left upper corner) and choose a printer. But when you use the following code inside delphi to preview and/or direct print it's not fired. The events OnStartReport, OnStopReport works in all cases fine. But again the OnReportPrint event is only fired when you used the designer first.

IF (rbPreview.Checked) THEN
BEGIN
IF PrepareReport
THEN
ShowPreparedReport;
END;
IF (rbPrinter.Checked) THEN
BEGIN
PrepareReport;
Print;
END;

The problem seems to be inside the frxPreviewPages.pas:

Report.DoNotifyEvent(Report, Report.OnReportPrint, not Report.EngineOptions.DestroyForms);

The parameter "not Report.EngineOptions.DestroyForms" is not correct in these two described cases.

Thanks in advance for your quick support!

Kind regards

Comments

  • gpigpi
    edited 4:16AM
    wrote:
    The parameter "not Report.EngineOptions.DestroyForms" is not correct in these two described cases.
    This is correct behavior
    Set TfrxReport.EngineOptions.DestroyForms to False

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.