This question is a follow-up to my previous question: SAS - pdf output with changed bookmarks
I have added the ODS PROCLABLE and DESCRIPTION to the code and the bookmarks are created fine. But if I click on any of the bookmarks, nothing happens - the pdf file does not jump to the specific graph. Why is to so ? Does anything need to be added to the code ?
data out_i_a; set sashelp.retail; run;
data out_ii_b; set sashelp.retail; run;
data y;
length saz tef x1 x2 $100;
input saz $ tef $ x1 $ x2;
datalines;
i a desc1 desc1a
ii b desc2 desc2a
;
run;
%macro grafy();
proc sql;
select count(*) into: pocet from y;
quit;
ods _all_ close;
goptions hsize=20cm vsize=8cm;
ods pdf file="\\srv05\nt05g\TEST\GRAF\TOT_testing.pdf";
ods layout gridded columns=1;
%do i=1 %to &pocet;
data _null_;
set y (obs=&i);
call symput("saz" ,strip(saz));
call symput("tef" ,strip(tef));
call symput("x1" ,strip(x1));
call symput("x2" ,strip(x2));
run;
ods region;
ods pdf text="&saz._&tef";
symbol1 interpol=join height=10pt VALUE=NONE LINE=1 WIDTH=1 CV= _STYLE_;
symbol2 interpol=join height=10pt VALUE=NONE LINE=1 WIDTH=1 CV= _STYLE_;
Legend1 value=('SALES' 'YEAR');
axis1 label=('# sales');
axis3 label=('# year');
axis2 label=('date');
ODS PROCLABEL "&x1 &x2 SALES"; /* BOOKMARK1 */
proc gplot data= out_&saz._&tef;
plot (SALES)*DATE / overlay skipmiss
VAXIS=AXIS1
HAXIS=AXIS2 LEGEND=Legend1;
plot2 (YEAR)*DATE / overlay skipmiss
VAXIS=AXIS3
HAXIS=AXIS2 LEGEND=Legend1
DESCRIPTION="by Date";
run;
ods region;
symbol1 interpol=join height=10pt VALUE=NONE LINE=1 WIDTH=1 CV= _STYLE_;
symbol2 interpol=join height=10pt VALUE=NONE LINE=1 WIDTH=2 CV= _STYLE_;
Legend1 value=('year' 'month');
axis1 label=('in %, p.a.');
axis2 label=('date');
ODS PROCLABEL "&x1 &x2 SALES2"; /* BOOKMARK2 */
proc gplot data= out_&saz._&tef;
plot (YEAR MONTH)*DATE / overlay skipmiss
DESCRIPTION="YEAR MONTH"
VAXIS=AXIS1
HAXIS=AXIS2 LEGEND=Legend1;
run;
%end;
ods layout end;
ods pdf close;
%mend;
%grafy();
Thank you for any suggestions.
I wonder if there is an issue with ODS LAYOUT here. It looks like the TOC bookmarks can only link to new pages: so if you add
ods pdf startpage=now;
at some point (say at the end of your %do
loop), you'll be able to jump to that point. But if the layout just spans several pages, it doesn't look like you can link to it inside the page - at least as far as I can figure.