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;