Default Print Positions for Columns
Before you can print a value, indicate where it must be printed. As noted previously, Report-Writer automatically determines default column print positions from an analysis of the other report formatting statements. However, if you want to set up your own defaults, you can do so with the following column and block statements:
• .position
• .width
Using the .position statement, you can effectively set up margins for each column. This statement allows you to set the starting print position for a column and optionally, the width of the printed column in number of characters. You can also set the width of a column with the .width statement. All horizontal print positions start at 0 (left margin).
To print columns horizontally adjacent to each other, you must reference the column names within the same .print statement, separated by commas. If possible, Report-Writer can print the columns next to each other, at the positions specified in the .position statement(s) or at default print positions.
In some cases, however, the following block statements can be used to exercise more control over the printing of horizontally adjacent text:
• .block and .endblock
• .top
• .bottom
• .within and .endwithin
The .block and .endblock statements allow you to define a block of formatting and print statements to be treated as a unit. Then, you can use the .top or .bottom statements to reset the current line to the top or bottom of the defined block before processing the next statement. The .within and .endwithin statements temporarily set the report margins to the margins for a referenced column. This allows you to print text (such as the caption, Total) within the column margins without having to calculate the exact print position.
For details, see Column and Block Statements in the chapter "Report-Writer Statements."