The SAS Output Delivery System and reporting techniques

proc template with URL

Reply
Frequent Contributor
Posts: 78

proc template with URL

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;                                                                 

Super User
Posts: 7,758

Re: proc template with URL

The </div tag is incomplete.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
SAS Super FREQ
Posts: 8,861

Re: proc template with URL

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;

Ask a Question
Discussion stats
  • 2 replies
  • 467 views
  • 0 likes
  • 3 in conversation