TurboMagic 92 Posted August 7, 2023 I'm using FastReports Embarcadero edition. I'm looking for an even which signals me, that the report has been output (saved as PDF or sent to the printer). I haven't really found a suitable event yet. Maybe I just overlooked it? Share this post Link to post
Brian Evans 108 Posted August 7, 2023 Did you try OnAfterPrint for the frxReport in question? Note that a report is not always output - the user could close the preview and/or printer dialogs without printing. Share this post Link to post
TurboMagic 92 Posted August 8, 2023 Thanks, will try this one! In those cases where I print/output without preview the user cannot cancel 😉 Share this post Link to post
Fr0sT.Brutal 900 Posted August 9, 2023 Hmm, without preview you just know that output is done when execution passes the Report.Print line. Share this post Link to post
TurboMagic 92 Posted August 9, 2023 The event would be used to clear some data once the output has been created and thus Fast Reports no longer needs to have access to that data. Since the output is mandatory that shouldn't be problematic. Share this post Link to post
TurboMagic 92 Posted August 10, 2023 I wrote the OnAfterPrint events into some log now and it looks now, that this is not called after printing the complete report, but after printing each "component" on it. Reading the manual I find this confirmed: it is called after each band at least. I was looking for something being called after the complete report has been output. Share this post Link to post
mytbo 5 Posted August 10, 2023 On 8/9/2023 at 8:09 PM, TurboMagic said: The event would be used to clear some data once the output has been created and thus Fast Reports no longer needs to have access to that data. Is the answer I gave you on May 21 in forum Delphi-PRAXIS (DE) not helpful? Both links point to an example with source code. With best regards Thomas Share this post Link to post
TurboMagic 92 Posted August 10, 2023 I'll try to find the time to look into those examples tomorrow. I have to find the cause of some memory issue where my report generating class gets an interface reference, which it stores as a field in the object instance. It takes some of the data from it and assigns that to the report components in OnGetValue event. But when that event is called, the field with the interface reference is NIL! I haven't found out yet, who nils that reference or who overwrites that memory... 😞 Share this post Link to post
Brian Evans 108 Posted August 11, 2023 (edited) Perhaps OnAfterPrintReport which while not in the docs is in the list of events in the IDE. Edited August 11, 2023 by Brian Evans Share this post Link to post
mytbo 5 Posted August 11, 2023 1 hour ago, Brian Evans said: Perhaps OnAfterPrintReport which while not in the docs is in the list of events in the IDE. The event OnAfterPrintReport is fired only after printing. It is not fired during export (unless frxDotMatrixExport). With best regards Thomas Share this post Link to post