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 6:20PM
    frxReport1.Engine.StopReport;
  • edited 6:20PM
    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

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.