Data visualization with SAS programming

No proper TOC when two SAS Pdf combined in one Combined report

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 89
Accepted Solution

No proper TOC when two SAS Pdf combined in one Combined report

Hello Everybody,

 

I am using Below SAS code to combine my PDF files . I am using EG 7.1 

/* Method 1 */

/* Turn off the Output window */
ods listing close;

/* Open two ODS PDF instances, one creating COMBINED_1.PDF, and the other creating A.PDF */
ods pdf file="combined_1.pdf";
ods pdf(a) file="a.pdf";

proc report nowd data=sashelp.class(obs=10);
   title "In COMBINED.pdf and A.pdf";
run;

/* Close A.PDF, but COMBINED.PDF remains open */
ods pdf(a) close;

ods pdf(b) file="b.pdf";

proc report nowd data=sashelp.vtable(obs=20);
   title "In COMBINED.pdf and B.pdf";
   column libname memname nobs nvar crdate;
run;

ods pdf(b) close;

ods pdf(c) file="c.pdf" ;

proc report nowd data=sashelp.class;
   title "In COMBINED.pdf and C.pdf";
run;

ods pdf(c) close;
ods pdf close;

 

which is from 

http://support.sas.com/kb/35/375.html

 

I am able to append the pdf files with the no problem but TOC(Table of contents) looks different then what it was for individual PDF. I am wondering what am I missing here.

 

 

 

 

 

 


No Proper TOC.PNG

Accepted Solutions
Solution
‎04-20-2016 11:24 AM
Super User
Posts: 11,134

Re: No proper TOC when two SAS Pdf combined in one Combined report

The SAS TOC generator only understands one document. If you want all of the elements in the TOC generated by SAS then you they all go within a single Ods PDF / ODS PDF Close sandwich.

If you also want separate documents either look into proc document to redirect already created output to additional documents or run that separately.

View solution in original post


All Replies
Solution
‎04-20-2016 11:24 AM
Super User
Posts: 11,134

Re: No proper TOC when two SAS Pdf combined in one Combined report

The SAS TOC generator only understands one document. If you want all of the elements in the TOC generated by SAS then you they all go within a single Ods PDF / ODS PDF Close sandwich.

If you also want separate documents either look into proc document to redirect already created output to additional documents or run that separately.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 337 views
  • 0 likes
  • 2 in conversation