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. 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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