Oracle® OLAP DML Reference 11g Release 2 (11.2) Part Number E17122-07 |
|
|
PDF · Mobi · ePub |
The TEXTFILL function reformats a text value to fit compactly into lines of a specified width, regardless of its current format. TEXTFILL is commonly used to reformat text with an unnecessarily ragged right margin or with a bad line width.
Note:
TEXTFILL joins lines of text while reformatting, whereas ROW and REPORT reformat without joining lines. See Example 8-135, "The Effects of TEXTFILL on ROW"TEXT or NTEXT
TEXTFILL(text-expression, width)
A text expression to be reformatted to the specified width, regardless of the current format of the data. When you specify a TEXT expression, the return value is TEXT. When you specify an NTEXT expression, the return value is NTEXT.
The desired width of the reformatted data, entered as an INTEGER
value from 1
to 132
.
In a structured report, TEXTFILL reformats text-expression to the width you specify if that width is less than the width of the report column. When width is greater than the column width, it is ignored by TEXTFILL, and the expression is reformatted to the width of the column.
TEXTFILL fits as many words of text-expression as it can onto one line, placing just one space between words and removing extra spaces between words. When a word is longer than width, TEXTFILL breaks it across two or more lines. In this case there may be extra spaces at the end of lines.
Example 8-135 The Effects of TEXTFILL on ROW
The following example shows the effect of TEXTFILL on a ROW command, using the nicely formatted text variable textvar
.
The statement
SHOW textvar
produces the following output.
You can use the following options to control the format of your display. BMARGIN Controls the bottom margin. COLWIDTH Controls column width. COMMAS Controls the use of commas in numbers. DECIMALS Controls number of decimal places in numbers. LSIZE Controls the maximum length of a line. NASPELL Controls the spelling of NA values in output.
The ROW statement
ROW W 50 textvar
produces the following output.
You can use the following options to control the format of your display. BMARGIN Controls the bottom margin. COLWIDTH Controls column width. COMMAS Controls the use of commas in numbers. DECIMALS Controls the number of decimal places in numbers. LSIZE Controls the maximum length of a line. NASPELL Controls the spelling of NA values in output.
By contrast, the ROW statement with TEXTFILL
ROW W 50 TEXTFILL(textvar, 50)
produces the following output.
You can use the following options to control the format of your display. BMARGIN Controls the bottom margin. COLWIDTH Controls column width. COMMAS Controls the use of commas in numbers. DECIMALS Controls the number of decimal places in numbers. LSIZE Controls the maximum length of a line. NASPELL Controls the spelling of NA values in output.