Access Violation when closing Custom Preview to soon
Hello,
I want to use the unit rbPrvDlg for custom Previewer.
I have not changed the unit.
Every time I close the Previewer to soon (before the report is generated) with the x (right above), madException kicks in and reports an Access Violation. Is there a way to avoid this?
kind regards,
Dirk Janssens.
I want to use the unit rbPrvDlg for custom Previewer.
I have not changed the unit.
Every time I close the Previewer to soon (before the report is generated) with the x (right above), madException kicks in and reports an Access Violation. Is there a way to avoid this?
kind regards,
Dirk Janssens.
Comments
The TppPrintPreview.FormClose method is called when an attempt is made to close the form. The event-handler code prevents the form from being close when Viewer.Busy (which internally returns false if the report engine is busy).
We are not receiving reports of AV's and this code has been in place for a long time. I think in real world use this implementation is working.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
If I disable MadExcept, I do not have a problem. But I was adviced to look into into it. Do you think I can ignore this? Or is there something wrong in my code which causes the AV?
It really is very simple, a few lines of code.
The application freezes if i click on the x to close the preview, before the reports is completely generated. I cannot trace the exact location. Even madExcept does not kick in... strange...
after " ppReport1.Print ;" , the preview appears, and while rendering, I click on the x.
no changes made to rbPrvDlg
The report is on the form,and is simple, but has some code to simulate a little complexity.
Do you need the project? Or is this enough information?
Does this also occur if you use the Preview toolbar Cancel/Close button?
I tested yesterday and again today, but I cannot produce an AV.
Please create a simple example project I can build and run in the debugger. Use standard Delphi components and RB. Send in zip format to support@
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
No, only with alt-F4 or the 'x' right above. I ll send you the project...