Creating a TextReport variable
EGL defines a TextReport external type to represent the engine behind text report generation. You create a variable based on this type to get access to the variables and functions in the native code.
EGL defines the TextReport type as an ExternalType part (for more
information, see ExternalType part).
Use an EGL new statement to declare a variable
based on this type, as in the following example:
myReport TextReport = new TextReport();The constructor function TextReport() creates the variable. You
can call this function with no arguments (the function will use defaults
for all values), or you can call it with the following arguments (you
can use a null value in any position to get the default value for
the corresponding argument):
- outFileName
- A string that contains the name of the report file. A null value causes the report to go to the standard output (STDOUT).
- topMargin
- An integer that represents the number of blank lines at the top of each page. A null value leaves the setting at the default of 3.
- bottomMargin
- An integer that represents the number of blank lines at the bottom of each page. A null value leaves the setting at the default of 3.
- leftMargin
- An integer that represents the number of spaces to the left of each line. A null value leaves the setting at the default of 5.
- rightMargin
- An integer that represents the default right margin for wordwrap operations. A null value leaves the setting at the default of 132.
- pageLength
- An integer that represents the number of lines on each page, including the top margin, header, trailer and bottom margin.
- TopOfForm
- A string whose first character issues a form feed to the printer. This argument has no effect when you generate for COBOL, where reports must go to a file rather than directly to a printer.
You can set the same values through the startReport() function; see startReport().