BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
bharath86
Obsidian | Level 7

Hi,

Below is the code I am using to generate the PDF, I am in need of removing the level two bookmarks from the output. The highlited bookmarks from the below image. I tried multiple ways but I am not succesful. Please advise how to completely remove the highlited bookmarks. 

image.png

 

 

 

ods proclabel='TOC';
	  proc report nowd data=toc contents="" ;
	  columns node tlg combtit;
        define node     / group noprint;
	    define tlg      / display ' ' style(column)=[asis=on cellwidth=1.3in just=l color=blue] style(header)=[just=l] ;
	    define combtit  / display ' ' style(column)=[asis=on cellwidth=7.7in just=l color=blue] style(header)=[just=l] ;
        break before node / contents="" page;
	  run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
Those Table1 Table2 marks must be from the PROC which is NOT PROC REPORT .

View solution in original post

9 REPLIES 9
Ksharp
Super User

Your code looks right.

 

data class;
set sashelp.class;
retain id 1;
run;

ods pdf file='c:\temp\temp.pdf';
ods proclabel='TOC';
	  proc report  nowd data=class contents="" ;
        define id     / group noprint;
	    define name     / display ' ' style(column)=[asis=on cellwidth=1.3in just=l color=blue] style(header)=[just=l] ;
        break before id / contents="" page;
	  run;
ods pdf close;

image.png

bharath86
Obsidian | Level 7

So I guess I am missing something in proc document procedure which generates bookmarks for next pages or items. 

 

So is it the proc document procedure that generates bookmarks for every new item in a PDF ?

bharath86
Obsidian | Level 7

Hi,

If my code looks right, I dont get the output like you have. I still get those extra "Table 1 and Table 2" bookmarks. in my output using the same code. 

 

I am not sure how to control those second level nodes. I tried solutions from https://support.sas.com/kb/31/278.html here as well. but still i get them. 

 

Please advise. 

 

 

Thank you

Bharath 

Ksharp
Super User
Those Table1 Table2 marks must be from the PROC which is NOT PROC REPORT .
bharath86
Obsidian | Level 7

Yeah, This is from proc document to assign labels to each object (TLF's). I am able to assign labels but cant suppress the next level bookmarks. I sthere a way to achieve this. 

 make temp;
 dir \temp#1;

 %do by=1 %to &bycnt;
 %let thispath=%scan(&bylist,&by,|);
 copy \itemlib.&thisitem.&thispath to ^;
 %end;

 setlabel \work.&thisitem\temp#1 "&bookmark";
 run;
Ksharp
Super User

Sorry . I am not familiar with proc documentation. Maybe @Cynthia_sas  know it.

bharath86
Obsidian | Level 7

Hmm ok, I tried a lot of her @Cynthia_sas answers from the communities. Most of them are from report. May be @Cynthia_sas if you can help me achieve this. Would be of great help. Do you want me to raise a diferent question and tag you. 

Ksharp
Super User
Nopps, Just start a brand-new topic . And maybe other sas user could give you a hand.
Cynthia_sas
SAS Super FREQ

Hi:

  You don't show ALL of your code, ALL the code, including the original procedures and ALL the PROC DOCUMENT code. No on can run your code without any data. However, I always recommend that you get all your code working to make the structure you want in PROC DOCUMENT before you macro-ize anything in a %DO loop.

 

  Here is my original paper https://support.sas.com/resources/papers/sgf09/318-2009.pdf on using PROC DOCUMENT and ODS DOCUMENT to replay and rearrange ODS output. As you can see, I did not macro-ize any folder/directory/object creation in the new Document store.

 

  For detailed help, I recommend working with Tech Support. They can look at ALL your code and ALL your data and help you come to a resolution in getting the Table of Contents the way you want.

 

  I recommend to my students that they start by making an entirely new (initially empty) document store, then design the folder structure they want and then copy objects one at a time and replay frequently, to make sure that phantom titles, page breaks or bookmarks from the original procedure output are not being accidentally copied into the new document store.

 

Cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 9 replies
  • 1413 views
  • 4 likes
  • 3 in conversation