How to cancel the execution of already started pro

Hi,

On a form I have a button which generates a report (using FastReoprt 3.20 Ado Components).
I would like to add another button for user to use to cancel the
generation of a report becuase it takes more time then
the user expected. What code should I put on click of the "cancel report"
button?
Any help greatly appreciated.

P.S. Using Delphi 7.

Best regards

Josko

Comments

  • edited 3:18AM
    frxReport1.Engine.StopReport;
  • edited 3:18AM
    Tried and failed.

    It comes to the line
    frxReport1.PrepareReport; and waits (loads the waiting animated form on which I have "CancelReport" button).
    I press "CancelReport" button with code
    frxReport1.Engine.StopReport;

    but this code executes when the report is already prepared and there is no point to it.

    What am I doing wrong?

    Regards

    Josko

Leave a Comment