<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Embed SGPLOT and Proc Report in Email in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Embed-SGPLOT-and-Proc-Report-in-Email/m-p/475100#M285968</link>
    <description>&lt;P&gt;Omit the data _null_ step, but use ods text:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS HTML BODY=sendmail;

ods text='&amp;lt;img src=cid:sgplot&amp;gt;';

proc report data = Weekly center style=seasideprinter;
	column ('Week Ending' week), Metric;
	define week / across ' ';
	define Metric / analysis sum f=comma6. ' ';
run;

ODS HTML CLOSE;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 03 Jul 2018 06:52:43 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-07-03T06:52:43Z</dc:date>
    <item>
      <title>Embed SGPLOT and Proc Report in Email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Embed-SGPLOT-and-Proc-Report-in-Email/m-p/475067#M285967</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to embed a SGPLOT chart as a png a PROC REPORT table as HTMl in the body of the same email, I can get one or the other to work but not both together (code below sends as 2 emails).&amp;nbsp; Any ideas to embed them both in the same email?&amp;nbsp; Do I need to convert the PROC REPORT to a&amp;nbsp;png as well?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let workdir=%trim(%sysfunc(pathname(work)));
ods _ALL_ close; 
ods listing gpath="&amp;amp;workdir";
ods graphics / reset=index width=16in height=6in outputfmt=PNG imagename='Chart';  

proc sgplot data=Weekly;
	series x=week y=Metric;
run;

filename sendmail email 
	to=("") 
	from=("")
	attach=("&amp;amp;workdir./Chart.png" inlined='sgplot')
	type='text/html' subject="Weekly Summary";

data _null_;
	file sendmail;  
	put '&amp;lt;html&amp;gt;';
	put '&amp;lt;body&amp;gt;';
	put '&amp;lt;img src=cid:sgplot&amp;gt;';
	put '&amp;lt;/body&amp;gt;';
	put '&amp;lt;/html&amp;gt;';
run; 

ODS LISTING CLOSE;
ODS HTML BODY=sendmail;

proc report data = Weekly center style=seasideprinter;
	column ('Week Ending' week), Metric;
	define week / across ' ';
	define Metric / analysis sum f=comma6. ' ';
run;

ODS HTML CLOSE;
ODS LISTING;

filename sendmail clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 22:50:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Embed-SGPLOT-and-Proc-Report-in-Email/m-p/475067#M285967</guid>
      <dc:creator>P5C768</dc:creator>
      <dc:date>2018-07-02T22:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Embed SGPLOT and Proc Report in Email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Embed-SGPLOT-and-Proc-Report-in-Email/m-p/475100#M285968</link>
      <description>&lt;P&gt;Omit the data _null_ step, but use ods text:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS HTML BODY=sendmail;

ods text='&amp;lt;img src=cid:sgplot&amp;gt;';

proc report data = Weekly center style=seasideprinter;
	column ('Week Ending' week), Metric;
	define week / across ' ';
	define Metric / analysis sum f=comma6. ' ';
run;

ODS HTML CLOSE;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Jul 2018 06:52:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Embed-SGPLOT-and-Proc-Report-in-Email/m-p/475100#M285968</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-03T06:52:43Z</dc:date>
    </item>
  </channel>
</rss>

