BookmarkSubscribeRSS Feed
cxterm
Fluorite | Level 6

Hello,

I have three questions about the PDF bookmarks generated by RWI table. 

  1. if there are multiple tables in one data _null_ step, is it possible not show selected table in bookmark?
  2. Could I combine the tables in different data _null_ step as second level under one bookmark?
  3. Is it possible add a top level bookmark over all bookmarks of data _null_ step? in 

I created a sample below. Thanks in advance!

 

ods pdf file="test.pdf";
title1 j=c "Sample of Class";
ods proclabel="Bookmark 1";
proc sort data=sashelp.class out=class;
	by sex;
run;
data _null_;
	set class end=eof;
	by sex;
	if _N_ = 1 then do;
		dcl odsout o();		
	end;
	if first.sex then do;
		if SEX = 'F' then do;
			o.table_start(label: 'Sex=F, keep it in bookmark');
		end;
		else do;
			o.table_start(label: "Sex=M, don't show in bookmark");
		end;
	end;
	o.row_start();
		o.format_cell(data: Name ||' ' ||SEX);
	o.row_end();
	if last.sex then do;
		o.table_end();
	end;
	if eof then do;
		o.table_end();
	end;
run;
ods proclabel="Can I move the following bookmarks under Bookmark 1?";
data _null_;
	set class end=eof;
	by sex;
	if _N_ = 1 then do;
		dcl odsout o();		
	end;
	if first.sex then do;
		if SEX = 'F' then do;
			o.table_start(label: 'Sex=F, keep it in bookmark');
		end;
		else do;
			o.table_start(label: "Sex=M, don't show in bookmark");
		end;
	end;
	o.row_start();
		o.format_cell(data: Name ||' ' ||SEX);
	o.row_end();
	if last.sex then do;
		o.table_end();
	end;
	if eof then do;
		o.table_end();
	end;
run;
ods pdf close; 
ods listing;

The original bookmark of sample as 

The original sample bookmarkThe original sample bookmark

The bookmarks sample if the question 1 can be solved

bookmark 1.png

The sample bookmark after question 2 be solved.

bookmark 2.png

And finally the bookmark looks like

bookmark 3.png

2 REPLIES 2
Norman21
Lapis Lazuli | Level 10

Have you tried using Java Script functions?

 

https://www.lexjansen.com/wuss/2006/data_presentation_and_business_intelligence/DPR-Karunasundera.pd...

Norman.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

cxterm
Fluorite | Level 6

Thank you!

I noticed that paper. I can modify the bookmark using js, ghostscript or other tools after the PDF is created. However, I want to find if it can be down in SAS itself other than through third party solution because my PDF generated through SAS intrnet. 

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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