12. Report-Writer Statements : Text Positioning Statements : .Center Statement--Center the Text
Share this page                  
.Center Statement--Center the Text
The .center statement centers the next text to be printed.
This statement has the following format:
.center | .cen | .ce [[+|-] n | columnname | expression]
The parameters for the .center statement are listed below:
+ | -
If sign is present, the position is moved n positions relative to the last output position. If unsigned, the position is the absolute position in the output line.
The position around which the next block of text is centered. The default value is the halfway point between the left and right margins of the report.
The name of a column in the report. You can specify the column name as a delimited identifier by enclosing it in double quotes ("), if you have previously specified the .delimid statement.
Report-Writer determines the position for the column either explicitly through the use of the .position statement, or implicitly as described in Automatic Determination of Default Settings. Report-Writer positions the text in the next .print statement around the center for the column. For more information, see the discussion following this table.
A numeric or string expression. If the expression is numeric, it must evaluate to the position around which the next block of text is centered. If the expression is a string, it must evaluate to the name of a column in the report. Precede all variables that are part of the expression with a dollar sign ($).
The plus sign (+) and minus sign (-) must be explicitly stated and cannot be part of the expression.