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
SAS Super FREQ

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;

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
  • 1123 views
  • 0 likes
  • 3 in conversation