BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Springyboy
Fluorite | Level 6

Hi everyone,

I am trying to customise my ODS PDF table of contents using an SGPlot. I am running SAS 3.3 so am unsure if this is supported.

Can someone please confirm whether this is possible for my version of SAS Studio?

E.g. the code below does not customise the table of contents from here https://support.sas.com/resources/papers/proceedings11/252-2011.pdf -

 

ods pdf file="display1.pdf";
proc print noobs data=sashelp.cars; run;
proc gchart data=sashelp.cars;
vbar type / sumvar=horsepower;
run;
quit;
ods pdf close;


But instead outputs:


the print procedure
print (1st node should be customised)
the gchart procedure
gchart (1st node should be customised)


in the table of contents instead of customising the first node as described in the training.


Thanks so much!

1 ACCEPTED SOLUTION

Accepted Solutions
Springyboy
Fluorite | Level 6

Thanks so much for that!

That works but only when I was running SAS in a fresh session or resetting it.

It turns out another piece of code I was running had the statement in it:

options nolabel;

Once I removed that then this code ran as intended.

View solution in original post

2 REPLIES 2
yabwon
Amethyst | Level 16

Try this:

ods html close;
ods pdf file="display1.pdf";

title;
title "Output from PRINT procedure";
ods proclabel "Output from PRINT procedure";
proc print noobs data=sashelp.cars contents="Output from PRINT procedure for sashelp.cars"; 
run;

title "A graph of horsepower";
ods proclabel "A graph of horsepower";
proc gchart data=sashelp.cars;
vbar type / sumvar=horsepower description="Output from GCHART procedure for Type in sashelp.cars";
run;
quit;
ods pdf close;
ods html;

and read about: ods proclabel, contents=, description=, etc.

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Springyboy
Fluorite | Level 6

Thanks so much for that!

That works but only when I was running SAS in a fresh session or resetting it.

It turns out another piece of code I was running had the statement in it:

options nolabel;

Once I removed that then this code ran as intended.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1080 views
  • 1 like
  • 2 in conversation