The SAS Output Delivery System and reporting techniques

Remove bookmarks when output results of multiple procedure by ods pdf

Reply
Contributor
Posts: 49

Remove bookmarks when output results of multiple procedure by ods pdf

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
SAS Super FREQ
Posts: 8,743

Re: Remove bookmarks when output results of multiple procedure by ods pdf

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
Contributor
Posts: 49

Re: Remove bookmarks when output results of multiple procedure by ods pdf

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
Super Contributor
Posts: 273

Re: Remove bookmarks when output results of multiple procedure by ods pdf

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
Contributor
Posts: 49

Re: Remove bookmarks when output results of multiple procedure by ods pdf

Thanks.
Super User
Posts: 9,676

Re: Remove bookmarks when output results of multiple procedure by ods pdf

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
SAS Super FREQ
Posts: 8,743

Re: Remove bookmarks when output results of multiple procedure by ods pdf

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
Super User
Posts: 9,676

Re: Remove bookmarks when output results of multiple procedure by ods pdf

Hi.Cynthia.
I guess view this PDF under SAS explorer.
If you open this PDF from disk by pdf-reader,then bookmarks will disappear.
Contributor
Posts: 49

Re: Remove bookmarks when output results of multiple procedure by ods pdf

Hi Ksharp,

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

Lu
Super User
Posts: 9,676

Re: Remove bookmarks when output results of multiple procedure by ods pdf

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
Contributor
Posts: 49

Re: Remove bookmarks when output results of multiple procedure by ods pdf

Thank you.
Ask a Question
Discussion stats
  • 10 replies
  • 1589 views
  • 0 likes
  • 4 in conversation