Can only get first page to print

edited August 2004 in FastReport 2.xx VCL
Hi all,
I have just began to use Fast Report 2.5 and I am having a problem getting it to print all the pages in the report. Here is the code I am using
frReport1.LoadFromFile('C:\TestReport\other.frf');

if frreport1.PrepareReport then
frReport1.printpreparedreport('',1,true,frall);

It does print to the printer but only prints the first report, I have used the print preview also and it only prints the first page from there also, but it has 4 pages to view in the preview. Any Ideas???

Thanks
Rod

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 7:00AM
    i assume the other design pages are related to the first page's data.
    set the dataset property of the report component to point to the dataset that everything is related to.
    ;)
  • edited 7:00AM
    In the report I have only PAGE1 in the report and the dataset is set to where the data is stored. What I am doing is using a band to give me all the reports in this page, ie. 4 pages with the same format but different clients and invoice numbers.

    In the preview I see 4 pages of information, but it only prints the first one.

    any more ideas??

    here is what I came up with for a work around for now, maybe this will help clarify what is happening
     
      i := FieldLookup.RecordCount;
      j := FarmLookup.RecordCount;
    
       if frreport3.PrepareReport then
       frReport3.ShowPreparedReport;
       for k := 1 to i do
        begin
          if frreport3.PrepareReport then
             frReport3.printpreparedreport(inttostr(k),1,true,freven);
       end;
    

    by using "inttostr(k)" to specify what page to print and puting it in a for loop I can get it to work, but should be able to use the '' to print all shouldn't I??

    Thanks again
    I really do appriciate the help;
    Rod

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.