<?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: ODS html and sgplot - no output in html file in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/ODS-html-and-sgplot-no-output-in-html-file/m-p/533312#M17762</link>
    <description>&lt;P&gt;Instead of ods html file=&lt;/P&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;PRE&gt;ods html path="&amp;amp;output_path./" (url=none) body="dq_master_&amp;amp;dtstamp..html"&lt;/PRE&gt;
&lt;P&gt;HTML behaves a bit differently than several of the other ods destinations because of such options as FRAMES . The URL=None part has the code generate a relative path to sub-elements&amp;nbsp; such as frame or contents so you don't have to use absolute addressing to the other bits.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Feb 2019 15:59:38 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-02-06T15:59:38Z</dc:date>
    <item>
      <title>ODS html and sgplot - no output in html file</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ODS-html-and-sgplot-no-output-in-html-file/m-p/533291#M17760</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am placing SGPLOTs in an ODS html: all fine, no errors, but opening the HTML I only get to see a little X with the text "The SGPlot Procedure" (attached: SGPLOT.PNG - no it is not: png was refused but I think you know what I mean, ;-)). All other output is produced as expect though in this case these are just prints...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have a solution for this, I did not find anything googling this and I do see a lot of ods html's followed by proc sgplots...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: I am on SAS 9.3 using EG here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For completeness I show you the code, sample data is difficult but as said: I have no data trouble, no syntax trouble - outside the html all works fine and the expected outputs can be produced. I also verified that the template used did not break it (it is included below because the ods html statement uses it):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/******************************************/
/* Aanpassingen aan de stijl voor de html */
proc template;
 define style styles.nobreak;
 parent=styles.statistical;
 /* Haalt de break na elke procedure eruit */
 style body from body / pagebreakhtml=_undef_;
 end;
run; 
%let pbreak=%nrstr(&amp;lt;p style="" page-break-after:always""&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;hr/&amp;gt;); 
/******************************************/

/*****************************/
/* Creëren HTML met ODS HTML */
filename HtmlDest "&amp;amp;OUTPUT_PATH./DQ_Master_&amp;amp;DTSTAMP..html";* mod;

ods listing close;
ods html file=HtmlDest (title="Data Kwaliteit MasterFile")
  style= styles.nobreak;

proc sgplot data=HistoFull;
  vbar Klasse / 
    response=PCT_TOT_EAD 
    group=T groupdisplay=cluster grouporder=data
    ;
  xaxis display=(nolabel) discreteorder=data;
  yaxis label='% Totale EAD' grid;
  keylegend / location=inside position=topright;
run;

ods html close;
ods listing;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks in advance for any help...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best,&lt;/P&gt;&lt;P&gt;Dirk&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 15:25:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ODS-html-and-sgplot-no-output-in-html-file/m-p/533291#M17760</guid>
      <dc:creator>dirkvk</dc:creator>
      <dc:date>2019-02-06T15:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: ODS html and sgplot - no output in html file</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ODS-html-and-sgplot-no-output-in-html-file/m-p/533311#M17761</link>
      <description>&lt;P&gt;HTML files don't embed images, they get linked to instead.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you need to ensure where the gpath is set is accessible to whomever is opening the HTML file or package them together somehow.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTML5 will embed images into the file, so it's a quick workaround and it also means it's easier to share the files.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html file= " .... " gpath = 'Path to where images will be stored';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/172460"&gt;@dirkvk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am placing SGPLOTs in an ODS html: all fine, no errors, but opening the HTML I only get to see a little X with the text "The SGPlot Procedure" (attached: SGPLOT.PNG - no it is not: png was refused but I think you know what I mean, ;-)). All other output is produced as expect though in this case these are just prints...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone have a solution for this, I did not find anything googling this and I do see a lot of ods html's followed by proc sgplots...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS: I am on SAS 9.3 using EG here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For completeness I show you the code, sample data is difficult but as said: I have no data trouble, no syntax trouble - outside the html all works fine and the expected outputs can be produced. I also verified that the template used did not break it (it is included below because the ods html statement uses it):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/******************************************/
/* Aanpassingen aan de stijl voor de html */
proc template;
 define style styles.nobreak;
 parent=styles.statistical;
 /* Haalt de break na elke procedure eruit */
 style body from body / pagebreakhtml=_undef_;
 end;
run; 
%let pbreak=%nrstr(&amp;lt;p style="" page-break-after:always""&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;hr/&amp;gt;); 
/******************************************/

/*****************************/
/* Creëren HTML met ODS HTML */
filename HtmlDest "&amp;amp;OUTPUT_PATH./DQ_Master_&amp;amp;DTSTAMP..html";* mod;

ods listing close;
ods html file=HtmlDest (title="Data Kwaliteit MasterFile")
  style= styles.nobreak;

proc sgplot data=HistoFull;
  vbar Klasse / 
    response=PCT_TOT_EAD 
    group=T groupdisplay=cluster grouporder=data
    ;
  xaxis display=(nolabel) discreteorder=data;
  yaxis label='% Totale EAD' grid;
  keylegend / location=inside position=topright;
run;

ods html close;
ods listing;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks in advance for any help...&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best,&lt;/P&gt;
&lt;P&gt;Dirk&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 15:58:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ODS-html-and-sgplot-no-output-in-html-file/m-p/533311#M17761</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-06T15:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: ODS html and sgplot - no output in html file</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ODS-html-and-sgplot-no-output-in-html-file/m-p/533312#M17762</link>
      <description>&lt;P&gt;Instead of ods html file=&lt;/P&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;PRE&gt;ods html path="&amp;amp;output_path./" (url=none) body="dq_master_&amp;amp;dtstamp..html"&lt;/PRE&gt;
&lt;P&gt;HTML behaves a bit differently than several of the other ods destinations because of such options as FRAMES . The URL=None part has the code generate a relative path to sub-elements&amp;nbsp; such as frame or contents so you don't have to use absolute addressing to the other bits.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 15:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ODS-html-and-sgplot-no-output-in-html-file/m-p/533312#M17762</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-02-06T15:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: ODS html and sgplot - no output in html file</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ODS-html-and-sgplot-no-output-in-html-file/m-p/533342#M17763</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before seeing any of your posts, I figured it out. I wanted to share my solution with you guys.&lt;BR /&gt;Sorry that I haven't used any of your possibly excellent solutions (yet), I will read them all and possibly change to that once time permits. I needed a solution ASAP for this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the story goes like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS runs on a linux machine where the root of things is "data2/data/" and somewhere below that my html file is created.&lt;/P&gt;&lt;P&gt;I have no access to the linux other than through the SAS/EG, which sits on on a Win Server 2008 that I access through RDC.&lt;/P&gt;&lt;P&gt;On the latter, which is also the location where I access the produced html, the same location as above is "\\sv-secret\", ;-).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what happens is: the html is pointing the png it produced to a location that is not existing and therefore it is not showing up in the html.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My solution was the following:&lt;/P&gt;&lt;P&gt;- explicitely point the png files to the right location (which I did not do before) - still linux though (see gpath remark below)&lt;/P&gt;&lt;P&gt;- read in the produced html (rnamed toProcess.html)&lt;/P&gt;&lt;P&gt;- alter the&amp;nbsp;"data2/data/" to become&amp;nbsp;"\\sv-secret\" and while at it change all / to \&amp;nbsp;&lt;/P&gt;&lt;P&gt;- write out the latter to a new html file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note, before that I tried gpath = using the target for that as the&amp;nbsp;"\\sv-secret\" but SAS complained about that location not existing (which does not on the linux where the SAS is running) and said it ignored that...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is convoluted but it works - as said, I might change for something nicer when time permits, :-D.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks 4 your answers!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Post-processing the produced HTML */
data html_in;
length FullLine $32767.;
infile "&amp;amp;OUTPUT_PATH./ToProcess.html" dlm='°' lrecl=32767 dsd;
/*if anyone has a better idea for the dlm='°', do let me know, :-). &lt;BR /&gt;I basically do not want to stop reading a record before it ends, &lt;BR /&gt;that's why I took a dlm which is a char that doesnt exist in the file &lt;BR /&gt;- all quick dirty but working, :-D */
input FullLine $;
run;

data html_out;
  set html_in;
  if index(FullLine,'.png') and index(FullLine,'src=') then do;
    FullLine = tranwrd(tranwrd(FullLine,'/data2/data/','\\sv-secret\'),'/','\');
  end;
run;

data _null_;
  set html_out;
  file "&amp;amp;OUTPUT_PATH./DQ_Master_&amp;amp;DTSTAMP..html";
  put FullLine;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Feb 2019 17:10:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ODS-html-and-sgplot-no-output-in-html-file/m-p/533342#M17763</guid>
      <dc:creator>dirkvk</dc:creator>
      <dc:date>2019-02-06T17:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: ODS html and sgplot - no output in html file</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ODS-html-and-sgplot-no-output-in-html-file/m-p/533343#M17764</link>
      <description>I am going to implement this...</description>
      <pubDate>Wed, 06 Feb 2019 17:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ODS-html-and-sgplot-no-output-in-html-file/m-p/533343#M17764</guid>
      <dc:creator>dirkvk</dc:creator>
      <dc:date>2019-02-06T17:12:48Z</dc:date>
    </item>
  </channel>
</rss>

