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.
input group $ count percent;
A 20 .2
B 30 .3
C 50 .5
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 ;
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.
ods proclabel 'top level node xxxx procedure ';
ods proclabel ' ';
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.
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.
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).
If the OP wants to eliminate ALL the bookmarks completely, then these will work:
ods pdf file='c:\temp\report1.pdf' bookmarkgen=no;
ods pdf file='c:\temp\report2.pdf' notoc;
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.