How to Programatically call the DialogPage Cancel Button event.

Using Fast Report VCL component.

In the Report i would automatically cancel the report generation based on certain criteria.

I am using Fast Report DialogPage and put in 2 button (Btn OK and Btn Cancel)

The report is working correctly when the user presses the Ok Event ( to Generate) and Btn Cancel (To cancel the report generation.)


What i would like to achieve is to call the Cancel Button Programatically via from the Script to cancel the Report Generation.


How can i call the

IF <condition> then

BtnCancel.click();


Can anyone help or guide me.

Comments

  • procedure frxReport1OnRunDialogs(var Result: Boolean);

    begin

       if <condition> then

         begin

           Result := False;

           Engine.StopReport;

         end;

    end;

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.