Valid in: | Anywhere |
Category: | ODS: Third-Party Formatted |
Interactions: | By default, when you execute a procedure that
uses the FORMCHAR system option (for example, PROC PLOT or PROC CHART),
ODS formats the output in SAS Monospace font. If you are creating
output that will be viewed in an operating environment that does not
have SAS software installed, this output will not be displayed correctly.
The SAS Monospace font is not recognized if SAS is not installed.
For the correct display of your document, include the following statement
before your SAS program: OPTIONS FORMCHAR="|----|+|---+=|-/\<>*"; To change the page orientation of the RTF output, specify the system option ORIENTATION=. To change the orientation, you will need to trigger the change by issuing the ODS RTF statement after the global options statement. See RTF Interaction with the ORIENTATION= System Option for details. |
Tips: | Microsoft Word 2002 is the current, official, minimum
level that is supported. However, no problems have been found with
Microsoft Word 2000 and SAS RTF files.
When producing large tables, use the ODS TAGSETS.RTF statement. For detailed information, see ODS TAGSETS.RTF Statement . |
The following actions are available for the ODS RTF statement:
tabulate
.
The second anchor is named tabulate1
;
the third is named tabulate2
, and so
on.
You can change anchor names as often as you want by submitting the ANCHOR= option in an ODS RTF statement anywhere in your program. After you specify an anchor name, it remains in effect until you specify a new one.
When you specify the BODYTITLE option, Microsoft Word no longer controls the placement of the header and footer text. However, Microsoft Word still controls other header and footer information, such as page number and date.
When you specify the BODYTITLE_AUX option, Microsoft Word no longer controls the placement of the header and footer text. However, Microsoft Word still controls other header and footer information, such as page number and date.
If you specify a value greater than the maximum number of one inch columns that can fit on the page, a note is printed to the SAS log that states what the maximum value can be for that page.
You must specify the TOC_DATA option to view the text that is captured in the Table of Contents. If not, the Table of Contents page displays the error message "Error! No table of contents entries found." NOTOC_DATA is the default option that is used.
You must specify media-type next to the file-specification specified by the CSSSTYLE= option.
You cannot use the NEWFILE= option with the FILE=fileref option.
RECORD_SEPARATOR= '0D0A'x
RECORD_SEPARATOR= '0D25'x
RS=
Note that when you specify the BODYTITLE= option, Microsoft Word no longer controls the placement of the headers and footers text. However, Word still controls other header and footer information, such as page number and date.
ods rtf toc_data;
Features: |
ODS RTF statement action:: CLOSE
|
Other features: |
#BYVAL parameter in titles NOBYLINE|BYLINE system option OPTIONS statement PROC FORMAT PROC PRINT PROC SORT PROC REPORT PROC TABULATE TITLE statement |
Data set: | Grain_Production |
Format: | $CNTRY. |
proc sort data=Grain_Production; by year country type; run;
ods html close;
ods rtf file='Grain.Rtf' contents toc_data;
options nobyline; title 'Leading Grain-Producing Countries'; title2 'for #byval(year)';
proc report data=Grain_Production nowindows; by year; column country type kilotons; define country / group width=14 format=$cntry.; define type / group 'Type of Grain'; define kilotons / format=comma12.; footnote 'Measurements are in metric tons.'; run;
options byline; title2;
ods rtf notoc_data;
proc tabulate data=Grain_Production format=comma12.; class year country type; var kilotons; table year, country*type, kilotons*sum=' ' / box=_page_ misstext='No data'; format country $cntry.; footnote 'Measurements are in metric tons.'; run;
ods rtf toc_data;
proc print data=Grain_Production; run;
ods rtf close; ods html;
proc report data=Grain_Production nowindows; by year; column country type kilotons; define country / group width=14 format=$cntry.; define type / group 'Type of Grain'; define kilotons / format=comma12.; footnote 'Measurements are in metric tons.'; run;
proc tabulate data=Grain_Production format=comma12.; class year country type; var kilotons; table year, country*type, kilotons*sum=' ' / box=_page_ misstext='No data'; format country $cntry.; footnote 'Measurements are in metric tons.'; run;
Features: |
ODS RTF statement action:: CLOSE
|
Other features: |
OPTIONS statement PROC PRINT TITLE statement |
OPTIONS NODATE NOSTIMER LS=78 PS=60;
ods html close;
ods rtf file="bodytitle_aux.rtf" bodytitle_aux;
proc print data=sashelp.class; run;
title j=l "left" j=c "center" j=r "right"; title2 j=l "left"; title3 j=c "center"; title4 j=r "right"; footnote j=l "left" j=c "center" j=r "right"; run;
ods rtf close; ods html;
title j=l "left" j=c "center" j=r "right"; title2 j=l "left"; title3 j=c "center"; title4 j=r "right"; footnote j=l "left" j=c "center" j=r "right"; run;
Features: |
ODS RTF statement action:: CLOSE ODS RTF statement option:: FILE= |
Other features: |
OPTIONS statement: ORIENTATION option PROC PRINT TITLE statement |
OPTIONS NODATE NOSTIMER LS=78 PS=60;
ods html close;
title 'Page Orientation'; title2 'Default';
ods rtf file="ChgOrientation.rtf";
proc print data=sashelp.class (obs=1); run;
title 'Page Orientation'; title2 'Landscape';
options orientation=landscape;
ods rtf;
proc print data=sashelp.class (obs=1); run;
ods rtf close; ods html;