BookmarkSubscribeRSS Feed
BoshYang
Calcite | Level 5

Hi,

 

I encount a problem when deal with the bookmarks of the pdf files, see my code below:

 

ods document name=test(write);
ods pdf file='temp2.pdf';
     proc print data=sashelp.class;
     run;

     proc sql;
         select * from sashelp.class;
     quit;

     proc tabulate data=sashelp.class;
         class age;
         var height weight;
         table age, height weight;
     run;
	 
     proc report data=sashelp.class;
	     column _all_;
     run;
	 
ods pdf close;
ods document close;

ods output properties=temp;
      proc document name=test;
              list/levels=all;
      run;quit;

ods pdf file="temp5.pdf";

     proc document name=test;
	 
         make \test1; 
	 dir \test1#1;
	 setlabel \test1#1 "Pirnt output";
	 copy \print#1\Print#1 to ^;
	 replay \test1;

	 make \test2;
	 dir \test2#1;	 
	 setlabel \test2#1 "SQL output";
	 copy \SQL#1\SQL_Results#1 to ^;	
         replay \test2;	 

	 make \test3;
	 dir \test3#1;	 
	 setlabel \test3#1 "Report output";
	 setlabel \Report#1\Report#1 "Detail";
	 copy \Report#1\Report#1 to ^;	 
         replay \test3;	      
     run;quit;
ods pdf close;	

However, after run this code, there's always a level-3 bookmark with name "Table" on the third block(Report output part), please see the snapshot below:

Before modifying the bookmark, it is:

before.PNG

 

After modifying the bookmark, it is:

after.PNG

 

Here, I want to remove the level-3 bookmark "Table 1",  does anyone have any suggestions? many thanks in advance!

4 REPLIES 4
Cynthia_sas
Diamond | Level 26
Hi, there is a Tech Support note about the extra Table1 node generated by PROC REPORT and how you can alter your PROC REPORT code to remove it. Here's the note: http://support.sas.com/kb/31/278.html

There have also been some previous postings on the Forums about this extra node and how to remove it. But the TS note has code and the code that's posted illustrates the fix.

cynthia
BoshYang
Calcite | Level 5

Hi Cynthia,

 

thank you very much, it works well! For exploratory purpose, can we use proc document to remove the "Table 1" ? 

Cynthia_sas
Diamond | Level 26
Hi:
It was my understanding is that to remove the Table 1 node completely, you must use the technique shown in the Tech Support note.

cynthia
BoshYang
Calcite | Level 5

Hi Cynthia,

 

thank you very much for the patient reply, i agree with you, i think that(useing content='' in the document you mentioned) might be the best solution so far, and let's wait for any constructive ideas about this.

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

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
  • 3138 views
  • 0 likes
  • 2 in conversation