Customized PROC TABULATE Output

You can use ODS options in Base SAS reporting procedures, PROC PRINT, PROC REPORT, and PROC TABULATE. In each of these procedures, you can specifically specify options in individual statements. This enables you to make changes in sections of output without changing the default style of all of the output. For example, you can customize specific sections of PROC TABULATE output by specifying the STYLE= option in specific statements within the procedure. Because the HTML destination is open by default, it is good practice to close the HTML destination if you do not want HTML output. This saves system resources.
ods html close;
options nodate nonumber;
proc sort data=sashelp.prdsale out=prdsale;
    by Country;
run;
ods rtf file='your-file-path/RTFPrdsaleCustom.rtf' style=Science;

title 'Actual Product Sales';
title2 '(millions of dollars)';

proc tabulate data=prdsale 1style=[fontweight=bold];   
    class region division prodtype /2 style=[textalign=center];   
    classlev region division prodtype / 3style=[textalign=left];   
    var actual / 4style=[fontsize=3];   
    keyword all sum;
    keylabel all='Total';   
    table (region all)*(division all*5[style=[backgroundcolor=yellow]]),
          (prodtype all)*(actual*f=dollar10.) /
          style=[bordercolor=blue] box=[label='Region by Division and Type'
          6style=[fontstyle=italic]];   
run;

title2;
title;

proc sgpanel data=prdsale;
    where quarter=1;
    panelby product / novarname;
    vbar region / response=predict;
    vline region / response=actual lineattrs=GraphFit;
    colaxis fitpolicy=thin;
    rowaxis label='Sales';
run;
ods rtf close;
1 The STYLE= option specified in the PROC TABULATE statement changes all of the font to bold for all of the data cells.
2 The STYLE= option specified in the CLASS statement centers the CLASS variable name headings.
3 The STYLE= option specified in the CLASSLEV statement left-justifies the CLASS variable level value headings.
4 The STYLE= option specified in the VAR statement changes the font size of analysis variable name headings to 3.
5 The first STYLE= option specified in the TABLE statement changes the background color of the cells containing the sum totals of REGION and DIVISION to yellow.
6 The second STYLE= option specified in the TABLE statement italicizes the font of the label of the empty box above the row titles.
Because the STYLE= option is specified in the ODS RTF statement, PROC TABULATE output uses the Science style and the specific style overrides specified in individual statements.
Customized PROC TABULATE Output Viewed in Microsoft Word
Customized PROC TABULATE Output Viewed in Microsoft Word