Prev: Help in Macro
Next: Number Truncation problem
From: Riaan van Straaten on 13 Jul 2010 07:53 Hi All. I'm trying to group SAS procedure outputs under one bookmark in PDF using ODS Document in SAS 9.2. Using the following code I get bookmarks that looks like this (bookmark hierarchy follows after code snippet): Code: ods document name=example(write); proc print data=sashelp.class; run; proc sql; select * from sashelp.class; run; quit; proc tabulate data=sashelp.class; class age; var height weight; table age, height weight; run; proc report data=sashelp.class nowd; columns age height weight; run; ods document close; proc document name=example; list/levels=all; run; quit; ods pdf file="c:\temp\example.pdf"; proc document name=example; make \example; dir \example#1; setlabel \example#1 "Procedure output"; setlabel \print#1\Print#1 "Print Output"; setlabel \SQL#1\SQL_Results#1 "SQL Output"; setlabel \Tabulate#1\Report#1\Table#1 "Tabulate Output"; setlabel \Report#1\Report#1\Report#1 "Report Output"; copy \print#1\Print#1 to ^; copy \SQL#1\SQL_Results#1 to ^; copy \Tabulate#1\Report#1\Table#1 to ^; copy \Report#1\Report#1\Report#1 to ^; replay \example#1; run; quit; ods pdf close; Output (Bookmarks in PDF): (-) Procedure output Print Output SQL Output Tabulate Output Report Output Table 1 The bookmark "Report Output" and "Table 1" is a bookmark to the same output. The output that I am aiming for is (-) Procedure output Print Output SQL Output Tabulate Output Report Output When I look in the documents window under the Work.Example document, I can see that the hierarchy of the Procedure Output document is the way that I want it, but the moment I write the document out to PDF, the "Table 1" bookmark appears. If I change my code by commenting out the setlabel \Report#1\Report#1\Report#1 "Report Output" part of the Proc Document code, I get the following bookmark hierarchy (-) Procedure output Print Output SQL Output Tabulate Output Table 1 Does anyone know of a way that I can eliminate that last bookmark "Table 1", or eliminate the "Report Output" Bookmark and relabel the "Table 1" bookmark? Is there any other methods that I can use to group several Proc Report outputs under one bookmark that I can use? Thanks and Regards. Riaan van Straaten
|
Pages: 1 Prev: Help in Macro Next: Number Truncation problem |