12. Report-Writer Statements : Column and Block Statements : .Block/.Endblock Statements--Enable/Disable Block Mode : Description
 
Share this page                  
Description
The .block and .endblock statements switch Report-Writer into and out of block mode, allowing you to use advanced capabilities of Report-Writer in formatting complex reports. While in block mode, you can move not only across the page (through the .tab statement) and down the page (through the .newline statement), but also back up the page (through the .top statement).
Block mode gives you the capability of logically printing information in your report, and then putting summary information ahead of the detailed information. Do this by switching Report-Writer into block mode, printing out some number of lines, moving to the top of the block to add summary information, and then printing out the entire block by leaving block mode.
By using this statement in conjunction with the .within and .endwithin statements, described later in this chapter, you can describe column headings and subtotaling in a more natural and convenient fashion than is possible if you had to describe each line completely before going to the next line.
All formatting statements are allowed within block mode, except for the .newpage and .need statements. Additionally, you can use the .top and .bottom statements only while in block mode to move the current position within the block.
Report-Writer permits a default maximum of 310 explicit .newline statements within any one block, as protection against misspecified columns. You can override this default by setting the ‑wmxwrap parameter in the report command.