BookmarkSubscribeRSS Feed
gzr2mz39
Quartz | Level 8
When the user clicks on "Click here for updates" I would like a new window to open up to www.sas.com.
The table looks correct, however, no link is being created.
Thank you.

data _null_;
dcl odsout obj();
obj.table_start(name: "Stock",
overrides: "width=80pct");
obj.row_start();
obj.format_cell(data: "News",
column_span: 2,
overrides: "backgroundcolor=BIGB color=white font_size=14pt font_weight=bold");
obj.row_end();
obj.row_start();
obj.format_cell(data: "Data released",
overrides: "just=left font_weight=bold color=GRB");
obj.format_cell(data: "5/07/2010",
overrides: "just=left font_weight=bold color=black");
obj.row_end();
obj.row_start();
obj.format_cell(data: "Planned data release date",
overrides: "just=left font_weight=bold color=GRB");
obj.format_cell(data: "6/07/2010",
overrides: "just=left font_weight=bold color=black");
obj.row_end();
obj.row_start();
obj.format_cell(data: "Click here for Updates",
file: "http://www.sas.com",
overrides: "just=left font_weight=bold color=GRB");
obj.format_cell(data: "6/07/2010",
overrides: "just=left font_weight=bold color=black");
obj.row_end();
run;
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
Well, if you were doing the report in PROC REPORT, the style override would be:
[pre]
style(header)={url='http://www.sas.com' foreground=purple background=pink}
[/pre]

However, I'm not sure that URL= will work with these data step objects, though. If you CAN use FILE: as the right argument, for setting a cell URL, I'm not sure that it will work with the FORMAT_CELL method.

You might also want to check in the pre-production documentation. The pre-production documentation is here:
http://support.sas.com/rnd/base/datastep/dsobject/Power_to_show_documentation.pdf

In the documentation, I also note that there is an OBJECT.HREF method as shown here:
[pre]
obj.href(data: “SAS Home page”,
file: “http://www.sas.com/index.html”);
[/pre]

So, it seems like your FILE: might be OK if you used a different method than OBJ.FORMAT_CELL

Since the ODS DATA step object is still pre-production, you might want to check with Tech Support on this question. If they don't know the answer, they can work with the developers to get you the answer.

cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 1474 views
  • 0 likes
  • 2 in conversation