ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
Athenkosi
Obsidian | Level 7

I'm tried to create a table of contents using the example in the SAS documentation (see the example below). I'm not getting the same results my pdf file does not contain a table of contents, please help.

 

I am using SAS 9.4M4 on SAS EG 7.1

 

title "Create a Table of Contents";
options nodate;
ods pdf file="pathname-to-MyDefaultToc.pdf" contents=yes bookmarklist=hide;
proc print data=sashelp.cars;
run;

proc print data=sashelp.class;
run;
ods pdf close;

 

3 REPLIES 3
CarmineVerrell
SAS Employee

 

I just ran code and here is what I got, a page that has a title of Table of Contents within the PDF, as well as links to the proc prints to sashelp.cars.

 

CarmineVerrell_0-1606221656207.png

 

 

Athenkosi
Obsidian | Level 7

Thanks for the response. If possible may you please attach the pdf file that you generated so I can view it on my side, I suspect this issue has something to do with my Adobe reader setttings

Cynthia_sas
SAS Super FREQ

Hi:

  When I run your code, this is the PDF file I get:

Cynthia_sas_0-1606236412138.png

I am displaying it inside Acrobat Reader in 2 page view. The only thing I changed in your code was THIS:

ods pdf file="c:\temp\MyDefaultToc.pdf" contents=yes bookmarklist=hide;

 

  To direct the output to my C: drive. If you are trying to open the output in EG, you may not be seeing the Table of Contents. One thing you can try is to put  ods _all_ close; before the ODS PDF statement like this:

ods _all_ close;

ods pdf file="c:\temp\MyDefaultToc.pdf" contents=yes bookmarklist=hide;

 

This would turn off all the destinations you might have turned on under Tools-->Options.

 

If you are having issues with ODS PDF, it might be your version of SAS or your version of Acrobat Reader. On the other hand, you may only need to go outside of Enterprise Guide to open the file. I used Windows File Explorer to find the file because I prefer opening the file directly from Windows than from inside Enterprise Guide.

 

Cynthia

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 3294 views
  • 0 likes
  • 3 in conversation