how to clear frxreport component
I want to print each record directly to the printer.
I did a loop:
The first time through the loop the printer prints the first page.
In the second pass, the printer prints the first and second page.
In the third through the loop, the printer prints the first, second, and third page
......
And here my question. How to clean a component frxreport not to print the same pages again?
I've tried
frxreport1.Clear
frxReport1.PreviewPages.Clear
and other, but all doesn't works.
I did a loop:
while not dataset.eof to
begin
frxreport1.loadfromfile(file.fr3);
frxreport1.PrepareReport();
frxreport1.Print;
end;
The first time through the loop the printer prints the first page.
In the second pass, the printer prints the first and second page.
In the third through the loop, the printer prints the first, second, and third page
......
And here my question. How to clean a component frxreport not to print the same pages again?
I've tried
frxreport1.Clear
frxReport1.PreviewPages.Clear
and other, but all doesn't works.
Comments
or you can use
frxreport1.loadfromfile('file.fr3',true);
i suspect you are doing something wrong in your code prior to
begin
dataset.first;
while not dataset.eof to // this cannot be a dataset that is used in the reort.
begin
frxreport1.clear;
frxreport1.loadfromfile(file.fr3);
frxreport1.PrepareReport();
frxreport1.Print;
end;
dataset.next;
end;