12. Report-Writer Statements : Page Layout and Control Statements : .Pagewidth Statement—Set Page Width : Description
 
Share this page                  
Description
The .pagewidth statement controls where line breaks occur. With the .pagewidth statement, you specify total number of characters specified per line through a constant or variable.
If you specify a variable for width, Report-Writer evaluates the variable during the loading of the report specification, before retrieving any data.
The value used in the .pagewidth statement must be greater than or equal to the width determined from the .leftmargin and .rightmargin values. The .rightmargin value must be greater than the .leftmargin value. If you are using a .position statement in your specification, its value must be less than the value of .pagewidth.
While running the report, Report-Writer checks to see if the total count of characters goes beyond the .pagewidth value. If so, an error message appears on the screen, or if possible, the report executes within the assigned width.
You can override this statement at runtime by specifying the ‑l flag on the report command line. Otherwise, the report reflects the .pagewidth setting. If there is no .pagewidth statement and the ‑l flag is not specified, Report-Writer uses 132 as the default width, and tries to execute the report within that width. If this is not possible, an error message appears on the screen.
All reports created and saved through RBF automatically generate a page width comment that RBF uses to set the page width when you run the report. Delete the page width comment from an archived RBF report specification and add an explicit .pagewidth statement instead. If you fail to delete the page width comment when specifying the page width explicitly, Report-Writer can truncate the text.