As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Tips:Highlighting report cells with no data

From sasCommunity
Revision as of 21:09, 29 March 2011 by Frankfry (Talk | contribs)

Jump to: navigation, search

Have you ever produced a report and needed to highlight cells with no data to make sure that they don't get lost/missed?

If so, you can take advantage of the fact that you can use formats to specify the style attributes for a cell. Typically this is done to provide traffic highlighting of values (e.g., show different ranges in different colors).

In the example shown at right a format is created to map missing values to yellow and all other values to white. The format is then used to provide the background color for the cell. This results in cells with no data being highlighted in yellow.

proc format;
 value highlite . = 'yellow'
            other = 'white';
proc report data=sashelp.class nowd;
 columns age sex,(height weight);
 define age / group;
 define sex / group across;
 define height / sum style=[background=highlite.];
 define weight / sum style=[background=highlite.];

Checkout the see also link for more examples of proc report techniques.

Submitted by Don Henderson. Contact me at my Discussion Page.

....see also