Chapter Contents |
Previous |
Next |
The Complete Guide to the SAS Output Delivery System |
Style Definitions, Style Elements, and Style Attributes |
Each style definition is composed of style elements. A style element is a collection of style attributes that apply to a particular part of the output. For instance, a style element may contain instructions for the presentation of column headers or for the presentation of the data inside cells. Style elements may also specify default colors and fonts for output that uses the style definition.
Each style attribute specifies a value for one aspect of the presentation. For instance, the BACKGROUND= attribute specifies the color for the background of an HTML table or for a colored table in Printer output. The FONT_STYLE= attribute specifies whether to use a Roman, a slant, or an italic font. For information on style attributes, see Style Attributes.
Note: Because style definitions control the presentation
of the data, they have no effect on output objects that go to the Listing
or Output destination.
Table Definitions, Table Elements, and Table Attributes |
In addition to the parts of the table definition that order the headers and columns, each table definition contains or references table elements. A table element is a collection of table attributes that apply to a particular header, footer, or column. Typically, a table attribute specifies something about the data rather than about its presentation. For instance FORMAT specifies the SAS format to use in a column. However, some table attributes describe presentation aspects of the data.
Note: The parts of table definitions that
control the presentation of the data have no effect on output objects that
go to the Listing or Output destination. However, the parts that control the
structure of the table and the data values do affect Listing output.
For information on table attributes, see Table Attributes.
Customizing Presentation Aspects of ODS Output |
To specify a style definition for your ODS output, use the STYLE= option in the ODS statement for the destination or destinations that you are using (see Appending to HTML Files). Note that you must specify the option for each destination. Your site may have its own customized style definitions that are used for all HTML and Printer output to give the output a consistent appearance.
Some of the standard style definitions that are currently shipped with the SAS System include
default | D3D |
beige | minimal |
brick | printer |
brown | statdoc |
To find an up-to-date list of the style definitions:
View | Results |
Operating Environment Information: For information on navigating in the Explorer window without a mouse, see the section on "Window Controls and General Navigation" in the SAS documentation for your operating environment.
You can also display a list of the available styles by submitting the following PROC TEMPLATE step:
proc template; list styles; run;
You can create your own style definitions or modify existing ones with PROC TEMPLATE (see The TEMPLATE Procedure).
Customizing Output for a Tabular Output Object |
For a procedure, the name of the table definition that is used for an output object comes from the procedure code. The DATA step uses a default table definition unless you specify an alternative with the TEMPLATE= suboption in the ODS option in the FILE statement (see the discussion of TEMPLATE=).
ods trace on; your-proc-or-DATA-step ods trace off;
The trace record refers to the table definition as a template. For a detailed explanation of the trace record, see Contents of the Trace Record.
Note: Remember that not all
procedures use a table definition.
If you produce a trace record for one of these procedures, no definition appears
in the trace record.
You can use PROC TEMPLATE to modify a table definition as a whole, but, in general, you can't directly specify a table element for your procedure or DATA step to use without modifying the definition itself. When a procedure or DATA step uses a table definition, it uses the table elements that that definition defines or references.
Note: Two
base procedures, PROC REPORT and PROC TABULATE, do provide a way for you to
access table elements from the procedure step itself. Accessing the table
elements enables you to do such things as specify background colors for certain
cells, change the font face for column headers, and so forth. For more information,
consult "Customizing the Style Definition that ODS Uses" in "Fundamental
Concepts for Using Base SAS Procedures" in SAS Procedures Guide, as well as the
documentation for these two procedures in the same document.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.