Hi,
I have to question with respect to the table of contens in PDF files when using the table of contents options.
First question
%let xxdemo = ...;
proc format;
value $sex 'M'='Male'
'F'='Female';
run;
proc sort data=sashelp.class out=class;
by descending sex;
run;
data class;
set class;
dummy=0;
format sex $sex.;
run;
options nobyline;
ods pdf file ="&xxdemo./reporting/test.pdf" startpage=no contents;
ods proclabel 'Level 1';
title '#byval(sex)';
proc report data=class contents='Level 2';
by descending sex;
column dummy sex age;
define dummy / order noprint;
define sex / display;
define age / display;
break before dummy / contents = 'Level 3' page;
run;
ods pdf close;
In the output, we can see that the table of contents include Sex=Male and Sex=Female. How to replace it with a value like the one in the title i.e. #byval1?
Question 2
%let xxdemo = ...
proc format;
value $sex 'M'='Male'
'F'='Female';
run;
proc sort data=sashelp.class out=class;
by descending sex;
run;
data class;
set class;
dummy=0;
format sex $sex.;
run;
options nobyline;
ods pdf file ="&xxdemo./reporting/test.pdf" startpage=no contents;
ods proclabel ' ';
title '#byval(sex)';
proc report data=class contents=' ';
by descending sex;
column dummy sex age;
define dummy / order noprint;
define sex / display;
define age / display;
break before dummy / contents = ' ' page;
run;
ods pdf close;
In this example, the text of levels 1, 2 and 3 are removed. but we still get the lines in the table of contents created with the contents option. How to remove them?
Thanks