printText()

Use the textReport.printText() function to add a text string to the report output. You can use this function to perform most of the output for your report. You will typically call textReport.printText() from the function that the onEveryRowListener variable points to (see Text report functions).

You can specify a minimum length for the string. If so, EGL pads the string with spaces if it is shorter than the minimum. The string is not truncated if it is longer than specified. If you need to specify a maximum length for the string, use textReport.printTextFixedWidth() (see printTextFixedWidth()).

Syntax

  textReport.printText(
     textString STRING in
     [fieldLength INT in] )
textReport
The name of a variable that is based on the TextReport external type.
textString
The text string to be added to the output at the current column position (not on a row by itself).
fieldLength
A minimum length for the string. The engine adds spaces if your string is shorter than this length, but does not truncate the string if it is longer.

Example

The following example shows the function the report engine calls for every row. Fields from the record that the engine builds for the report are printed in the first two columns.

myReport TextReport = new TextReport();
...
function onEveryRow(e TextReportEvent)
   textReportEngine.printText("Line #" 
      :: myReportRecord.col1 :: myReportRecord.col2);
   textReportEngine.println();
end

Feedback