fillReport()

The syntax diagram for the ReportLib.fillReport function is as follows:

  ReportLib.fillReport(
    report Report in,
    source DataSource in)
report
The report to be filled with data.
source
The source of the data that is used to fill the report.
Consider this example, which shows how a variable of type reportData is associated with the report:
    eglReport     Report;
    eglReportData ReportData;
    eglReport.reportData = eglReportData;
source indicates which field to use in the variable of type ReportData. Each value of source is not a field name, but a value in the enumeration DataSource:
databaseConnection
Use the variable that is referenced in the connectionName field of the reportData variable, as in this example:
  eglReportData.connectionName = "mycon";

In this case, the SQL statement that accesses data is in the report design file, which is created outside of EGL.

reportData
Use the variable that is referenced in the data field of the reportData variable, as in this example:
  // an array of records, with data
  myRecords customerRecord[]; 

  eglReportData.data = myRecords;
sqlStatement
Use the SQL statement identified in the sqlStatement field of the reportData variable, as in this example:
  mySQLString = "Select * From MyTable"; 
  eglReportData.sqlStatement = mySQLString;    
Following is an example invocation:
  ReportLib.fillReport (eglReport, DataSource.sqlStatement);
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.