BookmarkSubscribeRSS Feed
rkumar23
Calcite | Level 5

Does somebody has way of adding a particular HTTP address at the bottom of the Proc report or via PROC TEMPLATE ..??

I tried with the below proc template to have a POSTHTML added with the HREF however look like it doesn't work....

proc template;                                                        

define style styles.test;                                             

parent=styles.default;                                                

style table from table /                                              

outputwidth=99%                                                       

prehtml='<div style="overflow:auto; width:95%;height:800px" id="xxx">'

posthtml="</div";                                                     

style header from header /                                            

htmlstyle='z-index:20; position:relative;                             

top:expression(document.getElementById("xxx").scrollTop)';            

style rowheader from rowheader /                                      

htmlstyle='position:relative;                                         

left:expression(Container=xxx.scrollLeft)';                           

end;                                                                 

2 REPLIES 2
Cynthia_sas
Diamond | Level 26

Hi:

  Here is PROC REPORT showing many different ways to create a URL without using PROC TEMPLATE (and, as Kurt noted, you have malformed HTML in your template code -- so that wouldn't render in the browser).

Cynthia

ods _all_ close;

ods html path='c:\temp' (url=none)

        file='seturl.html' style=sasweb;

title link="http://www.sas.com" 'Visit the SAS Site';

footnote link="http://www.google.com" 'Ask Google a Question';

proc report data=sashelp.class(obs=3) nowd;

  column name age sex height weight;

  define name / order 'Click name to see famous people';

  compute name;

    length urlvar $100;

    urlvar = "https://www.google.com/#q="||trim(name)||'+'||'famous+people';

    call define(_col_,'URL',urlvar);

  endcomp;

  compute after / style={url="http://www.setgame.com"};

    line 'Click here to play a game';

  endcomp;

run;

ods html close;

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