fillReport()
You can use the reportLib.fillReport() function to fill a report using a specified data source.
Syntax
reportLib.fillReport(
report Report in,
source DataSource in)
- report
- The name of a report variable to be filled with data.
- source
- The source of the data that is used to fill the report. Use one
of the following values of the DataSource enumeration:
- databaseConnection
- Use the connection referenced in the connectionName field of the reportData variable. In this case, the SQL statement that accesses data is in the report design file, which is created outside of EGL.
- reportData
- Use the information that is referenced in the data field
of the reportData variable, as in the following
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.
Example
The following example shows the code to fill a report using an SQL statement:
reportLib.fillReport (eglReport, DataSource.sqlStatement);