Creating RTF Output

The ODS RTF statement creates RTF output. Suppose you decide that you want only PROC TABULATE output and PROC SGPANEL output in RTF format. To create this output, wrap (sandwich) the ODS RTF statement and ODS RTF CLOSE statement around your program. Use the FILE= option in the ODS RTF statement to specify the name and path for your file. The RTF output opens in Microsoft Word. 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/RTFPrdsale.rtf';
title 'Actual Product Sales';
title2 '(millions of dollars)';

proc tabulate data=prdsale;   
    class region division prodtype;   
    classlev region division prodtype;   
    var actual;   
    keyword all sum;
    keylabel all='Total';   
    table (region all)*(division all),
         (prodtype all)*(actual*f=dollar10.) /
         misstext=[label='Missing']
         box=[label='Region by Division and Type']; 
 run;

title 'Sales Figures for First Quarter by Product';
title2;
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;
PROC TABULATE Output Viewed in Microsoft Word
PROC TABULATE Output Viewed in Microsoft Word
PROC SGPANEL Output Viewed in Microsoft Word
PROC SGPANEL Output Viewed in Microsoft Word