Table 1 node generated by PROC REPORT


If PROC REPORT output is routed to ODS HTML, PDF, or RTF, and a table of contents is generated, three nodes will be included in the CONTENTS with the following default text:

The Report Procedure
Detailed and/or summarized report
Table 1

The first node is controlled with the ODS PROCLABEL statement. For example:

ods proclabel="Customized Text Here";

The second node is controlled with the CONTENTS= option on the PROC REPORT statement. For example:

proc report contents="My Contents" nowd; 
/* or use CONTENTS="" to remove the node entirely */

The third node can be controlled with the CONTENTS= option on the BREAK BEFORE statement. See the sample code below.

In the PDF destination, the level of nodes displayed in the table of contents can be controlled with the PDFTOC option. For example:

ods pdf file="file.pdf" pdftoc=1;

This option instructs the PDF Reader to display the table of contents with only the first level of nodes visible.

The sample code shows the creation of a variable that is the same for every observation. If one exists already, the first DATA step is unnecessary. 

data test; 
   set sashelp.class; 
   count=1; 
run; 

/* In the PROC REPORT, add this variable to the beginning of the COL 
statement, DEFINE it as either GROUP or ORDER, then add a BREAK BEFORE 
with a PAGE option and a null CONTENTS=. */

ods pdf file="test.pdf"; 
ods rtf file="test.rtf" toc_data contents ;                                                                                                                                   
                                                                                                                                        
ods proclabel="First Node";
proc report nowd data=test contents="Second Node"; 
   col count name age height weight; 
   define count / group noprint; 
/* Note that CONTENTS= on the BREAK statement is new syntax for SAS 9.2 */
   break before count / contents="" page; 
run; 
 
ods _all_ close;