EOF error in Delphi

When I'm calling a pre created report that is a simple ADOQuery from Delphi and in the pre -created report I don't set the number of rows in the master data band I get an EOF error (EOF OR BOF is true or current record has been deleted). And then the report loads just fine. However if i set the number of for less than or equal to the row count of the master data then I don't get that error. Is it required to know the number of master records when firing an ado query in a report called from delphi? here is the code i am using to call the report:
...

var Connection1 : tfrxAdoDatabase; //connection variable
    Query1 : tfrxADOQuery;
...



with tfrxReport.create(self) do
        try
          //Load Report
          LoadFromFile(ReportName);
          //load connection properties
          Connection1 := FindObject('Connection1') as tfrxAdoDatabase;
          //define connection username and password
          Connection1.setlogin('sysdba','BLAHBLAH');
          // prepare and show report
          if Preparereport then
          ShowPreparedReport;
        finally
          end;

I'm brand new using fast reports(this week is the first time i've used it. Im really struggling so any help would be greatly appreciated)

Comments

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.