How to cancel/exit report from the script
Hi, I am new here. Sorry for stupid questions......
How to exit report from the script if for example the dataset is empty or if any other codition is met?
procedure frr4OnStartReport(Sender: TfrxComponent);
var i:integer;
begin
if MyVar=true
then
need to exit/cancel report here. How?
end;
At what stage DataSet is opening? How do I cancel report with the message if Dataset is empty?
Thanks a lot
How to exit report from the script if for example the dataset is empty or if any other codition is met?
procedure frr4OnStartReport(Sender: TfrxComponent);
var i:integer;
begin
if MyVar=true
then
need to exit/cancel report here. How?
end;
At what stage DataSet is opening? How do I cancel report with the message if Dataset is empty?
Thanks a lot
Comments
ds: TfrxDataSet;
begin
ds := Report.GetDataset('frxDBDataSet1'); // username of dataset
if ds.recordcount = 0 then report.close;
end.