TEMPLATE Procedure: Creating a Style Template (Definition) |
Using the TEMPLATE Procedure to Create a Style |
The TEMPLATE procedure enables you to customize the look of your SAS output. The TEMPLATE procedure creates and modifies styles. The Output Delivery System then uses these styles to produce customized formatted output.
By default, ODS output is formatted according to the various styles that the procedure or DATA step specify. However, you can also customize the appearance of the output by using the DEFINE STYLE statement in the TEMPLATE procedure.
Terminology |
For definitions of terms used in this section, see Terminology: TEMPLATE Procedure.
within a dimension hierarchy, a descendant in level n-1 of a member that is at level n. For example, if a Geography dimension includes the levels Country and City, then Bangkok would be a child of Thailand, and Hamburg would be a child of Germany.
within a dimension hierarchy, the ancestor in level n of a member in level n-1. For example, if a Geography dimension includes the levels Country and City, then Thailand would be the parent of Bangkok, and Germany would be the parent of Hamburg. The parent value is usually a consolidation of all of its children's values.
What You Can Do with a Style |
By default, ODS uses styles to display the procedure or DATA step results. Modify the appearance of the output by customizing these styles. HTML Output from PROC PRINT That Uses the Default Style (Viewed with Microsoft Internet Explorer) shows the HTML output from PROC PRINT using the default style. HTML Output from PROC PRINT with the Customized Style (Viewed with Microsoft Internet Explorer) shows the same HTML output from PROC PRINT with a customized style.
HTML Output from PROC PRINT That Uses the Default Style (Viewed with Microsoft Internet Explorer)
When you are working with styles, you are more likely to modify a SAS style than to write a completely new style. The next display shows the kinds of changes that you can make to the default style for the HTML output. The new style affects both the contents file and the body file in the HTML output. In particular, in the contents file, the style makes changes to the following attributes:
two of the colors in the color list. One of these colors is the foreground color for the table of contents, the byline, and column headings. The other is the foreground color of many parts of the body file, including SAS titles and footnotes.
the presentation of the data in the table, by changing attributes such as cell spacing, rules, and border width.
In the body file, the new style makes changes to the following attributes:
HTML Output from PROC PRINT with the Customized Style (Viewed with Microsoft Internet Explorer)
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.