BookmarkSubscribeRSS Feed
LB
Quartz | Level 8 LB
Quartz | Level 8

Hello all;

I am essentially using the title statement as a way to create "buttons" with white for the color and a blue background color-

What I am attempting to do is assign separate url links to each element and this is where I have problems-

The code I have is below-In the end I need to add pdf anchors but for the purposes of the code I am just including basic urls-

Thank you.

Lawrence

options ls=130 nonumber nodate nocenter;

ods pdf file='temp.pdf';

title;

ods escapechar='^';

title j=center "^{style  [borderleftwidth=2pt borderleftcolor=black borderbottomwidth=3pt borderbottomcolor=black borderrightwidth=2pt   borderrightcolor=black

bordertopwidth=3pt bordertopcolor=black  background=blue color=white url='http://www.yahoo.com' ] A } |

^{style  [borderleftwidth=2pt borderleftcolor=black borderbottomwidth=2pt borderbottomcolor=black borderrightwidth=2pt   borderrightcolor=black

bordertopwidth=2pt bordertopcolor=black  background=blue color=white  url='http://www.google.com'] B }";

data _null_;

file print;

put 'xxx';

run;

ods pdf close;

3 REPLIES 3
Andre
Obsidian | Level 7

Hi LB

Find here some indication for yours buttons

next step could be the anchors   but in the title? it seems strange.

HTH

Andre

tested 9.3   but play and modify it

i have correct the syntax

options ls=250 nonumber nodate nocenter  orientation=landscape;

ods escapechar='^';

ods pdf file='d:\temp\button.pdf';

title;

title j=center

"^{style [borderleftwidth=2pt borderleftcolor=black borderbottomwidth=3pt              borderbottomcolor=black

  borderrightwidth=2pt

  borderrightcolor=black bordertopwidth=3pt bordertopcolor=black

background=blue color=white url='http://www.yahoo.com' ] A }

   

  ^{style  [borderleftwidth=2pt borderleftcolor=black borderbottomwidth=2pt 

   borderbottomcolor=black

  borderrightwidth=2pt borderrightcolor=black bordertopwidth=2pt

  bordertopcolor=black

background=blue color=white url='http://www.google.com'] B

    } ";


data _null_;

file print ods=(variables=(x(format=$20.))) ;

x= 'xxx';

put    _ods_ ;

run;

quit;

ods pdf close;




LB
Quartz | Level 8 LB
Quartz | Level 8

Andre;

Not sure if this is one of those differences between 9.2 & 9.3 but it fails in 9.2. Thank you for your assistance.

Yes I am looking to modify a report to "mimic" buttons with url links. If need be, I can import the buttons as jpegs and then assign them url links.

Lawrence

Andre
Obsidian | Level 7

Hi Lawrence,

Studying the outputs, i see finally that it works under 9.3.0 and 9.2.3

BUT i recognize that

with html destination  the buttons are refering to the correct hyperlinks

with pdf indeed yahoo is present twice!   and this is an error

with rtf  the hyperlinks are correct

another way to obtain your goal could be

.

title2link='http://www.ined.fr' "B";

So once again ods adaptations are not universal!

Sorry and ask for help to the sas support.

and transmit them the error we have discovered!

After, please report here about the error too.

Andre

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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