how to clear frxreport component

edited November 2013 in FastReport 4.0
I want to print each record directly to the printer.
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

  • gordkgordk St.Catherines On. Canada.
    edited 6:56PM
    You can call clear frxreport1.clear;
    or you can use
    frxreport1.loadfromfile('file.fr3',true);
  • edited February 2014
    I've tried this, but is doesn't works!
  • gordkgordk St.Catherines On. Canada.
    edited 6:56PM
    it works fine for me
    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;

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.