Canceling Report Execution

My user is telling me that he could not cancel a long report execution?

is there any trick for this ?

thanks

Comments

  • edited 4:14PM
    Try setting:
    frReport1.Terminated:=True;
  • edited 4:14PM
    but where should i put this code?
  • edited 4:14PM
    You will need to 'PrepareReport' in a thread to enable your application to be 'responsive'. Your application would have a 'Cancel' button that would set the Terminated flag against the FastReport object that is was preparing.

    All this is quite complicated; so if you just have the code:

    with frReport1 do begin
    if PrepareReport then
    ShowPreparedReport;
    end;

    The PrepareReport will show a dialog with a cancel button while it is being prepared.

Leave a Comment