Hi,
I am trying to send a report as the body of an email message. If I output the data as PDF, the report retains its gridlines. However, in the body fo the email the data appears without gridlines.
I tried adding style(report)=[rules=all frame = hsides] in the PROC REPORT statement to no result.
I would appreciate any suggestions. Thank you.
DeaT
libname xxx "/path";
FILENAME outbox email
to=("xxx@xxx.com")
type='text/html'
subject="xxx";
ods listing close;
ods html body=outbox ;
options nodate pageno=1 linesize=189 ;
PROC REPORT data=xxx.contacts(obs=5) split='*' nowd;
label customer_name = 'Cust*Name' customer_id = 'Cust*ID' fname='First*Name' lname='Last*Name'
work_phone_ext='Work*Phone*Ext' email='E-mail' contact_type='Contact*Type' ;
column Customer_name customer_id fname lname
work_phone_ext email contact_type ;
define action / display;
define customer_id / display;
define customer_name / display;
define fname / display;
define lname / display;
define work_phone_ext / display;
define email / display;
define contact_type / display;
Footnote;
Title J=C "xxxs";
Footnote1 'Total Updates =' "xxxt";
run;
ods html close;
ods listing;
Hi, if the gridlines show when the output is viewed in the browser, then the issue is with the way the mail applications is causing the ODS HTML to be rendered. Once SAS is done with creating the HTML, it is up to the browser or other application to render the HTML into what you see on the screen.
In some browsers, the interior table lines are considered to be part of the background of the "web page" shown in the browser -- so sometimes when you printed the HTML page, the gridlines seemed to disappear. That sounds like what your mail program might be doing. You could "fiddle" with other styles, but the mail program might treat them the same way.
In the end, you may just need to educate the people who get the output that they should view the output in the browsers. Or stop sending them HTML output and send them a PDF file as an attachment and then they should be able to view in Acrobat, and/or print if they want.
cynthia
What is the ODS style you use for HTML output?
Hi, if the gridlines show when the output is viewed in the browser, then the issue is with the way the mail applications is causing the ODS HTML to be rendered. Once SAS is done with creating the HTML, it is up to the browser or other application to render the HTML into what you see on the screen.
In some browsers, the interior table lines are considered to be part of the background of the "web page" shown in the browser -- so sometimes when you printed the HTML page, the gridlines seemed to disappear. That sounds like what your mail program might be doing. You could "fiddle" with other styles, but the mail program might treat them the same way.
In the end, you may just need to educate the people who get the output that they should view the output in the browsers. Or stop sending them HTML output and send them a PDF file as an attachment and then they should be able to view in Acrobat, and/or print if they want.
cynthia
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.
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.