BookmarkSubscribeRSS Feed
lueryy2000
Calcite | Level 5
Hi,

I read some threads in the forum but no luck finding the right answer for my problem. I wanted to output a pie chart( proc gchart) and a table (proc print) using ods pdf. SAS generated a main heading and a sub-heading for each procedure. It there a way to get rid of both main and sub-headings? If that is impossible, is sas able to suppress the sub-heading? I tried adding content="" option in the proc print and it suppressed the second node, but I don't know how to do it for the pie chart? Below is my data and code.

data mydata;
input group $ count percent;
datalines;
A 20 .2
B 30 .3
C 50 .5
;
run;

GOPTIONS RESET=ALL DEV=SASPRTC;
ODS LISTING CLOSE;
ODS PDF FILE="H:\report.pdf";

ODS LAYOUT START WIDTH=11in HEIGHT=8.5in;;

ODS REGION X=0.5in Y=1.8in HEIGHT=4.5in WIDTH=4.5in;

PROC GCHART DATA=mydata;
PIE group / sumvar=count ;
RUN;
QUIT;

ODS REGION X=4.5in Y=2.2in HEIGHT=5in WIDTH=7in;

PROC PRINT DATA=mydata ;
RUN;

ODS LAYOUT END;

ODS PDF CLOSE;
GOPTIONS RESET=ALL;
ODS LISTING;

Thanks in advance,
Lu
10 REPLIES 10
Cynthia_sas
SAS Super FREQ
Hi:
If you look up ODS PROCLABEL -- that is what you use to rename or suppress the information for the TOP level node in the Results Window or the Table of Contents.
[pre]
ods proclabel 'top level node xxxx procedure ';
OR
ods proclabel ' ';
[/pre]

For the lower level nodes, PROC GCHART does not have CONTENTS=, like PROC PRINT, PROC REPORT and PROC TABULATE. But you can use the DESCRIPTION= option to change the name of what you see for the GCHART output. However, DESCRIPTION=' ' will NOT suppress the TOC link for ODS PDF. If you use DESCRIPTION=' ' then you will still see GCHART in the Table of Contents.

I believe there have been some previous forum postings on using ODS DOCUMENT to rearrange and reorder objects in the result hierarchy, so the Table of Contents is different. Otherwise, (and you might want to check with Tech Support on this) I do not think there is a way to suppress the lower level node for classic SAS/GRAPH procedures.

cynthia
lueryy2000
Calcite | Level 5
Hi Cynthia,

Thank you very much for your reply.

You are correct. Now I can suppress the first and second heading of proc print procedure. However, the bookmarks disappeared, but the first node is still there. How to get rid of the node as well? The reason I want to completely eliminate the bookmarks for proc print is since the pie chart and the table are in the same page, clicking on one bookmark (proc gchart generated) could direct to it.

Thanks,
Lu
Andre
Obsidian | Level 7
It is so easy to delete those marks one by one
under Foxit reader (free edition) if you are obliged to avoid a paying Acrobat
0f course your pdf must be in a not protected state (or before applying protection).

HTH
Andre
Ksharp
Super User
Hi.
There is a option ,But I am not sure whether it is what you need.

[pre]
ODS PDF FILE="c:\report.pdf" bookmark='no';
[/pre]


Ksharp
Cynthia_sas
SAS Super FREQ
Hi:
If the OP wants to eliminate ALL the bookmarks completely, then these will work:
[pre]
ods pdf file='c:\temp\report1.pdf' bookmarkgen=no;
or
ods pdf file='c:\temp\report2.pdf' notoc;
[/pre]

However, while bookmark='no' did not give an error (which surprised me); it also did NOT suppress the PDF Table of Contents. In SAS 9.2 with your syntax, I still got a bookmark list in the PDF bookmark area.

cynthia
Ksharp
Super User
Hi.Cynthia.
I guess view this PDF under SAS explorer.
If you open this PDF from disk by pdf-reader,then bookmarks will disappear.
lueryy2000
Calcite | Level 5
Hi Ksharp,

Thank you for you reply. I tried but I still get bookmarks even I opened it in adobe reader.

Lu
Ksharp
Super User
Hi.Or maybe you need this.BTW 'bookmark=no' is worked for me ,It is weird.
Cynthia is right.


[pre]
ODS PDF FILE="c:\report.pdf" nobookmarklist nobookmarkgen;
[/pre]


Ksharp Message was edited by: Ksharp

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 10 replies
  • 3401 views
  • 0 likes
  • 4 in conversation