wordWrapPrint()

Use the textReport.wordWrapPrint() function to output the next print statement with a temporary right margin that forces the words to wrap if the margin is exceeded. The print engine disables the word-wrap feature after the print statement runs.

Syntax

  textReport.wordWrapPrint(
     [tempRightMargin INT? in])
textReport
The name of a variable that is based on the TextReport external type.
tempRightMargin
A margin that forces word wrap for the duration of the next print statement. If you do not specify a margin here, the print engine uses the default right margin.

Example

In the following example, the wordWrapPrint() function creates a temporary margin at column 80. If myCustomer.customerName is longer than 25 characters, the name will wrap to the next line.

myReport TextReport = new TextReport();
...
myReport.column(55);
myReport.wordWrapPrint(80);
myReport.printText(myCustomer.customerName);

Feedback