Hi Guys
I need to add a graph into the body of an email to send to users. I'm using ODS HTML4 to compile the ODS output, attaching the graph as an attachment and then 'inserting' it into the body of the mail by adding this ...
ods HTML4
text='
<div border-style: none!important>
<table border-style: none!important>
<IMG src="cid:Sami_AQ12" border="0" frameborder="0" cellspacing="0" cellpadding="0" border-style: none!important>
</table>
</div>
';
The graph appears in the email, but there's a border - not around the graph itself, but what looks like the container that I can't seem to get rid of.
Hi guys ... got the issue resolved ... Turns out you can add a chart in a 'title' section (and footnote) of your ODS output. It then assumes the style changes you made and drops the border if that's what you've specified in your custom style.
data _null_;
filename OUTBOX email
subject = "blah blah blah blaaaaa"
to = "blabla@gmail.com"
type = "text/html"
ct = "text/html"
attach = ("/folder/where/file/is/image.png" name="TRENDL" inlined="myimage")
;
ods html4 body=OUTBOX style=myeditedstyle;
options nocenter nobyline pagesize=max;
;
run;
proc report data = VALIDATION style={font_size=8pt font=('Calibri') width=400 cellpadding=2 borderwidth=0 bordercolor=white};
title1 justify=left height=9pt font="Calibri" "some or whatever text you want here";
title2='<IMG src="cid:myimage">;
footnote1 justify=left height=9pt font="Calibri" "some more text if needed";
run;
ods html4 close;
So is the border present if you create just the graph output file? Am trying to ascertain if this is a Graph question, or an ODS to HTML problem. If its in the graph then:
ods graphics on /reset=all border=off noborder;
Should get rid of the border.
Generate the same thing using html4 and html5. Then look at the underlying tagset output. That should show what option is different. I would imagine its a different setting in the tagset/style which needs setting, but can't check at the moment.
I've googled for "sas ods html 4 border option" and hope that next link can help you:
Hi guys ... got the issue resolved ... Turns out you can add a chart in a 'title' section (and footnote) of your ODS output. It then assumes the style changes you made and drops the border if that's what you've specified in your custom style.
data _null_;
filename OUTBOX email
subject = "blah blah blah blaaaaa"
to = "blabla@gmail.com"
type = "text/html"
ct = "text/html"
attach = ("/folder/where/file/is/image.png" name="TRENDL" inlined="myimage")
;
ods html4 body=OUTBOX style=myeditedstyle;
options nocenter nobyline pagesize=max;
;
run;
proc report data = VALIDATION style={font_size=8pt font=('Calibri') width=400 cellpadding=2 borderwidth=0 bordercolor=white};
title1 justify=left height=9pt font="Calibri" "some or whatever text you want here";
title2='<IMG src="cid:myimage">;
footnote1 justify=left height=9pt font="Calibri" "some more text if needed";
run;
ods html4 close;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: