| Constructing Stack Tables with Magic %GluePlus (Another User-Defined Macro for Creating Stack Tables) (2008) | |||||||||||||||
Abstract | |||||||||||||||
| As a composite table, a stack table is made up of a varying number of child tables that are placed one on top of another without any gaps. Unlike a regular table that has a fixed number of columns throughout the rows, a typical stack table allows each of its child tables to have its own number of columns and headers and each can vary its size, layout and style separately. A stack table hence gives a much greater freedom and creativity to the data presentation than a regular table does. Stack tables are commonly used in complex reports because of their effective integration of statistical results from multiple sources and flexible presentations of various aspects of concerns. In this paper, we extend the method introduced in [1] and present another macro called %GluePlus that can assemble multiple separate tables in a RTF file into a single stack table. The new macro is implemented by taking advantage of the power of Microsoft scripting technology via the SAS unnamed pipe mechanism. Based on the %GluePlus, an improved programming framework is provided for creating all kinds of stack tables systematically with a series of Data Steps, Proc Template and Proc Report Steps. A complete example is presented at the end to demonstrate the powerfulness and flexibility of the technique described in this paper. | |||||||||||||||
Publication details | |||||||||||||||
| |||||||||||||||