Generating a Table of Contents with TAGSETS.RTF
We have already seen the use of the CONTENTS= option with ODS RTF. To generate a table of contents with TAGSETS.RTF, the method is very similar. Consider the following code:
ODS TAGSETS.RTF FILE='TOC_SUBOPTIONS.rtf' OPTIONS(CONTENTS='yes' TOC_DATA='yes'); title 'Human Resources Reports'; proc means data=hr nonobs maxdec=0 mean sum; class Department; var AnnualSalary; run; proc print data=hr(obs=25); run; ODS _ALL_ CLOSE;
Although you might need to right-click farther down on the page than with traditional ODS RTF TOC generation, after you right-click and select Update Field, you will see a table of contents generated as shown in Figure 4.71.
Figure 4.71.
Get Output Delivery System: The Basics and Beyond now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.