I have used the information in the posting "Multiple children in PDF TOC" to get as far as I can.
I have a proc report with a set of by variables and its going to pdf. I want a bookmark for each combination of my 3 by variables. I have used proc document to modify the bookmarks, but I still end up with an extra bookmark for each proc report. Its at the same level as my modified book mark that contains the by variable values and its called "Table 1" in each instance. I'm happy to send my output pdf to anyone who wants to see what I mean if I haven't been clear.
I dummied up a similar program using sashelp.class.
options leftmargin=0.75in rightmargin=0.75in topmargin=0.5in bottommargin=0.5in
orientation=landscape;
ods escapechar='^';
OPTIONS NoByLine nonumber nodate MISSING='-';
proc sort data=sashelp.class out=class;
by sex age name;
run;
data _null_;
set class end=nomore;
by sex age name;
retain counter 0.;
counter = counter + 1;
call symput('label'||strip(put(counter,best.)),'Sex=' || strip(sex) || ', Age=' || strip(put(age,best.)) || ', Name=' || strip(name));
if nomore then call symput('subjcount',strip(put(counter,best.)));
run;
ods listing close;
ods document name=test2 (write);
proc report data=class nowd headline spacing=1 center split='!' missing contents=' ' spanrows;
by sex age name;
column height weight;
TITLE2 "Sex = #ByVal1 Age = #ByVal2 Name = #ByVal3";
define height / display 'Height!(in)' style=[just=dec];
define weight / display 'Weight!(lb)' style=[just=dec];
run;
ods document close;
** just so I could look at them;
proc document name=test2;
ods output properties=PROPERTIES;
list/levels=all;
run;
ods output close;
quit;
** create a new ODS document with 1 high level node and many children;
ods listing;
proc document name=neworder2(write);
make onetop;
dir onetop;
setlabel \onetop#1 'Listing of Sex, Age, and Name';
%macro it;
%do i = 1 %to &subjcount;
move \work.test2\Report#1\ByGroup&i#1\Report#1\Report#1 to ^;
setlabel \onetop#1\Report#&i "&&label&i";
%end;
%mend it;
%it
run;
quit;
*again so I could see what I did;
proc document name=neworder2;
ods output properties=PROPERTIES2;
list/levels=all;
run;
ods output close;
quit;
ods pdf file='testx.pdf' style=pdfstyle pdftoc=2;
proc document name=work.neworder2;
replay;
run;
quit;
ods pdf close;
Thanks in advance!
Sue