BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have created a PDF, using a number of Proc reports . Using proclabel, I have created a TOC with all of the correct titles but I also want to print the TOC at the begining of the report, with page nos, as it is normally distributed as a printed item.

Can anyone help?
4 REPLIES 4
Cynthia_sas
Diamond | Level 26
hi:
In SAS 9, you have the CONTENTS= option:
[pre]
ods pdf file='xyz.pdf' contents=yes;
** proc report 1;
** proc report 2;
** proc report 3;
ods pdf close;
[/pre]

cynthia
deleted_user
Not applicable
This gives a TOC with links on the electronic document but it does not form part of the doc when it is printed.
Cynthia_sas
Diamond | Level 26
Hi:
That is very odd. When I run the code below, and then print the resulting document, I do -get- a separate TOC as the first page when I print -- in both 9.1 and 9.2.

I suggest you contact Tech Support on this issue.

cynthia
[pre]
ods pdf file='c:\temp\xyz.pdf' contents=yes;

proc report data=sashelp.class (obs=5) nowd;
run;

proc report data=sashelp.class(obs=5) nowd;
run;

proc report data=sashelp.shoes(obs=50) nowd;
run;

proc report data=sashelp.class(obs=5) nowd;
run;

ods pdf close;
[/pre]
deleted_user
Not applicable
Thanks for that - I had the option in the wrong place...

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 4 replies
  • 1709 views
  • 0 likes
  • 2 in conversation