The following code creates two level ToC (RTF):
options nobyline ;
proc sort
data = sashelp.class
out = class
;
by sex ;
run ;
ods listing close ;
ods document
name = work.L16_2_1
( write )
;
proc report
data = class
contents = " "
;
by sex ;
column name
age
height
;
define name
/ display
;
define age
/ display
;
define height
/ display
;
run ;
ods document close ;
proc document
name = work.L16_2_1 ;
setlabel \Report#1\ByGroup1#1\Report#1 "L16.2.1 Test label 01 Safety Population Sex = F" ;
move \Report#1\ByGroup1#1\Report#1 to ^ ;
setlabel \Report#1\ByGroup2#1\Report#1 "L16.2.1 Test label 01 Safety Population Sex = M" ;
move \Report#1\ByGroup2#1\Report#1 to ^ ;
delete \Report#1 ;
ods output properties = properties ;
list
/ details
;
run ;
ods output close ;
ods rtf
file = "C:\Users\&sysuserid.\Documents\My SAS Files\setlabel_move.rtf"
style = styles.fda_tfl
startpage = bygroup
contents
toc_data
;
replay ;
run ;
ods rtf close ;
quit ;
This does not occur if I used the PRINT procedure. The "Table 1" does not occur. I would appreciate any corrections, tips, or citations.
Thank you,
Kevin
Cynthia,
Many thanks for your response. I will read the note and experiment more. I have studied many of your posts and papers. In particular, the ODS MARKUP destination with type = style_popup and stylesheet = "diag.css" has been a gamechanger! In general, we use REPORT extensively, almost even exclusively.
Best regards,
Kevin
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.