I'm trying to write a simple proc print to PDF and use proc document to rename the PDF bookmarks (this part works) but I noticed it removes my BY groupings in the PDF (only after running the PROC DOCUMENT step). The code below prints 9 pages of the same output with no page breaks by the BY variable. Is there any way to rename the PDF bookmarks but keep the BY variable grouping to be on individual pages? Thanks!
ods listing;
options nobyline nonumber nodate orientation=landscape;
ods document name=myreport(write);
ods pdf file='test.pdf' style= BarrettsBlue;
proc print data=setOrder noobs; by Region; run;
ods pdf close;
ods document close;
proc document name=myreport(update);
ods listing;
list / levels=all; run;
ods listing close;
setlabel Print#1\ByGroup1#1\Print#1 "";
setlabel Print#1\ByGroup2#1\Print#1 "";
setlabel Print#1\ByGroup3#1\Print#1 "";
setlabel Print#1\ByGroup4#1\Print#1 "";
setlabel Print#1\ByGroup5#1\Print#1 "";
setlabel Print#1\ByGroup6#1\Print#1 "";
setlabel Print#1\ByGroup7#1\Print#1 "";
setlabel Print#1\ByGroup8#1\Print#1 "";
setlabel Print#1\ByGroup9#1\Print#1 "";
run;
ods pdf file='test.pdf' style=BarrettsBlue pdftoc=1;
replay l; run;
ods pdf close;
ods listing close;
quit;
I don't understand your term "by groupings" You have the option NOBYLINE which removes the by line is that what you're talking about. You didn't supply data for your program.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.