The SAS Output Delivery System and reporting techniques

html page in mail

Reply
New Contributor
Posts: 2

html page in mail

Hi friends

I have used the below query to fix the headers of html page and the problem is im not getting fixed headers directly in a mail but while storing the html page in another location and using the link in a mail  headers are fixed.

Can u please suggest me the correct way to fix headers of html page in mail.

QUERY

PROC template;
     define style styles.test;
     parent=styles.default;
       style table from table /
             outputwidth=99%
             prehtml='<DIV
                     style="overflow:auto;
                     WIDTH:100%;HEIGHT:400px"
                     id="data">'
             posthtml="</div>";
       style header from header /
             htmlstyle='z-index:20;
                       POSITION:relative;
                       TOP:
                       expression(document.getElementById("data").scrollTop-2)';
         end;
   run;

FILENAME myfile EMAIL TO=
from=""
subject=""
  type="text/html";
ods _all_ close;
ods HTML close;
ODS HTML BODY=myfile RS=NONE STYLE=styles.test;


   proc print data=sashelp.class noobs;
     id name age /
        style(header)={
             htmlclass="rowheader header"
             htmlstyle="z-index:30"};
     var _all_ / ;

   run;
ods html close;

SAS Super FREQ
Posts: 8,864

html page in mail

Posted in reply to ramakanth

Hi:

  It's not clear to me what you are trying to do. You might investigate the HTMLSCROLL tagset template as a way to create output with headers that stay fixed when the table scrolls down on the page. If you search on support.sas.com for HTMLSCROLL, you should find some links.

  Next, some email systems do not allow HTML files to be sent in the body of and email. They want HTML files to be sent as attachments -- there are a lot of examples on how to do that on support.sas.com.

  Also, you may want to work with Tech Support on what you want to do here, because they have the expertise related to emailing using all the different techniques.

cynthia

New Contributor
Posts: 2

html page in mail

Posted in reply to Cynthia_sas

Hi

Using the below code im getting the required output.

ie in the link that used in text dataset.

Headers are fixed for the html page stored in that location.

ODS HTML BODY='path';


   proc print data=sashelp.class noobs;
     id name age /
        style(header)={
             htmlclass="rowheader header"
             htmlstyle="z-index:30"};
     var _all_ / ;

   run;
ods html close;

data text;

length a $ 100.;

a='<a href=http://path > click here for report</a>';

run;

FILENAME myfile EMAIL TO=

from=""

subject=""

  type="text/html";

ods _all_ close;

ods HTML close;

ods html body=myfile style=normal;

proc print data=text;

run;

ods html close;

For the code posted in first disc. headers are not fixed.

Email system that we using have HTML page support

SAS Super FREQ
Posts: 8,864

html page in mail

Posted in reply to ramakanth

Hi:

  It's still not entirely clear to me what you mean. If you want to know the difference between why or how the first posted code works compared to the second posted code, your best bet would be to work with Tech Support -- they have the email and the HTML expertise to help you figure out the answer to your question.

cynthia

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