printTextFixedWidth()

Use the textReport.printTextFixedWidth() function to add a text string to the report output. Specify a length for the string. The string will be padded with spaces if it is shorter than the minimum, and truncated if longer than the specified length. If you want to specify a minimum length for the string only, or do not want to specify a length, use textReport.printText() (see printText()).

Syntax

  textReport.printTextFixedWidth(
     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
An exact length to be printed. The engine adds spaces if your string is shorter than this length, and truncates the string if it is longer.

Example

The following example prints the first 10 characters of the specified string ("Company B "):

myReport TextReport = new TextReport();
companyName STRING;
...
   companyName = "Company B Inc.";
   textReportEngine.printTextFixedWidth(companyName, 10);

Feedback