Statistical Graphics Using ODS |
Changing the Default Style |
The default style for each ODS destination is specified in the SAS Registry. For example, the default style for the HTML destination is DEFAULT and the default style for the RTF destination is RTF. You can specify a default style for all of your output in a particular ODS destination. This is useful if you want to use a different SAS style, if you have modified one of the styles supplied by SAS (see the section Style Definitions and Colors), or if you have defined your own style. For example, you can specify the JOURNAL style as the default style for RTF output.
The recommended approach for specifying a default style is as follows. Open the SAS Registry Editor by typing regedit in the command line. Expand the node ODS DESTINATIONS and select a destination (for example, select RTF). Double-click the Selected Style item, shown in Figure 21.31, and specify a style. This can be any style supplied by SAS or a user-defined style, as long as it can be found with the current template search path (for example, specify Journal). You can specify a default style for the other destinations in a similar way.
ODS searches sequentially through each element of the template search path for the first style definition that matches the name of the style specified in the SAS Registry. The first style definition found is used. (See the sections Saving Customized Templates, Using Customized Templates, and Reverting to the Default Templates for more information about the template search path.) If you are specifying a customized style as your default style, the following are useful suggestions:
If you save your style in SASUSER.Templat, verify that the name of your default style matches the name of the style specified in the SAS Registry. For example suppose the RTF style is specified for the RTF destination in the SAS Registry. You can name your style RTF and save it in SASUSER.Templat. This blocks the RTF style in SASHELP.Tmplmst (provided that you did not alter the default template search path).
If you save your style in a user-defined template store, verify that this template store is the first in the current template search path. Include the ODS PATH statement in your SAS autoexec file so that it is executed at startup.
For the HTML destination, an alternative approach for specifying a default style is as follows. From the menu at the top of the main SAS window, select Tools Options Preferences. In the Results tab, check the Create HTML box and select a style from the pull-down menu.
Copyright © SAS Institute, Inc. All Rights Reserved.