BookmarkSubscribeRSS Feed
VijayKumar
Calcite | Level 5

Hi,

I am creating a pdf and displaying data and graph in that  and using hyperlink in footnotes, trying to visit the previous pages.
when I use the goptions reset=all;  or goptions device=png;   , the escapechar in footnote doesn't work. and because of that hyperlink doesn't   ..what could be the reason.
The escape charcater though works with  'ods pdf text' statements....

Below is the code...

Please guide...

data dat1;
     input year s1 s2 s3 s4;
     cards;
     1960 109 90 26 46
     1970 260 223 130 131
     1980 710 824 522 632
     1990 1676 1600 1083 1363
     1995 2114 2164 1631 1865
     2000 2535 2748 2012 2362
     ;
run;


data dat2;

     set dat1;

     sum=s1+s2+s3+s4;

run;

options mlogic symbolgen mprint;
/*goptions reset=all; 
goptions device=png; */
%macro makebar();
     options orientation=portrait;
     goptions ftext='Arial' gunit=pct  htext=1 ctext=green rotate=portrait;
     footnote1 j=left wrap "Link to 1st Page ->>" j=right "^S={&TOCfmth URL='#First1'} First";
     footnote2 j=left wrap "Link to 2nd Page ->>" j=right "^S={&TOCfmth URL='#Second2'} Second";
     footnote3 j=left wrap "Link to 3rd Page ->>" j=right "^S={&TOCfmth URL='#Third3'} Third";


     proc gchart data=dat2;
          vbar year/sumvar=sum width=15;
     run;
%mend;

%macro start();
     ods listing close;    
     ods escapechar="^";
     ods pdf file="Vk1.pdf" notoc;
     %let TOCfmth = %str(JUST=LEFT VJUST=MIDDLE CELLHEIGHT=14PT FONT_SIZE=10PT CELLWIDTH=145CM linecolor=white);

     ods pdf startpage=yes;
     ods pdf anchor = "First1";
     ods pdf text = "^S={&TOCfmth}First Page";

     ods pdf startPage=yes;
     ods pdf anchor = "Second2";

     proc print data=dat1;run;

     ods pdf startPage=yes;
     ods pdf anchor = "Third3";
     proc print data=dat2;run;

     %makebar;
     ods pdf close;
     ods listing;
%mend;

%start;

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

  ODS ESCAPECHAR does not work within SAS/GRAPH titles or footnotes. See this Tech Support note:

http://support.sas.com/kb/24/304.html

cynthia

VijayKumar
Calcite | Level 5

Thanks Cynthia for your reply.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 803 views
  • 3 likes
  • 2 in conversation