How to wait for Terminated
In a form with a TfrxPreview as child, I need to add a Close button. This button must cancel the Fast Report work, wait for the background task and return.
First tentative, in the OnClik event I do:
myReport->Terminated();
Close();
It fails because the background task is still working. I cannot delete the form because some events like OnProgressStop can be called.
How can I wait the end of background task?
It would be something like:
myReport->Terminated();
while(engine.IsRunning())
{
Application->ProcessMessages();
}
Close();
Thank you
First tentative, in the OnClik event I do:
myReport->Terminated();
Close();
It fails because the background task is still working. I cannot delete the form because some events like OnProgressStop can be called.
How can I wait the end of background task?
It would be something like:
myReport->Terminated();
while(engine.IsRunning())
{
Application->ProcessMessages();
}
Close();
Thank you
Comments