<?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: ERROR: Unable to load image trying to load png in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/282463#M16267</link>
    <description>&lt;P&gt;Added a gpath and still getting the same error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;goptions reset=all noborder xpixels=80 ypixels=25 ftext='Arial' ; ods graphics / reset=index; ods html &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;path="/sas/work/SAS_workF8B001B800A4_wasascsprd2.nu.com/SAS_workC06401B800A4_wasascsprd2.nu.com/"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2 + gpath="/sas/work/SAS_workF8B001B800A4_wasascsprd2.nu.com/SAS_workC06401B800A4_wasascsprd2.nu.com/" (url=none) &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;file="Sldr1.html" style=listing; proc gkpi mode=raised; hslider actual=2.88 bounds=(5 2.56 2.26 1.64 0) / noavalue nobvalue &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;target=. colors=&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;NOTE: Writing HTML Body file: Sldr1.html&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;3 +(red,yellow,green,blue) name="Sldr1"; run;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;ERROR: Unable to load image /sas/work/SAS_workF8B001B800A4_wasascsprd2.nu.com/SAS_workC06401B800A4_wasascsprd2.nu.com/Sldr1.png; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; default image will be used instead.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also verified that the file is in the directory and the file is not getting re-indexed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jul 2016 16:02:12 GMT</pubDate>
    <dc:creator>Bryan</dc:creator>
    <dc:date>2016-07-06T16:02:12Z</dc:date>
    <item>
      <title>ERROR: Unable to load image trying to load png</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/281219#M16218</link>
      <description>&lt;P&gt;Getting the following error &amp;nbsp;&amp;nbsp;"ERROR: Unable to load image /sas/work/SAS_work42770188005A_wasascsprd2.nu.com/SAS_work08B50188005A_wasascsprd2.nu.com/Sldr1.png; &lt;BR /&gt; default image will be used instead.", &amp;nbsp;checked the output folder and png in the folder,&amp;nbsp;code below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/* detect proper delim for UNIX vs. Windows */&lt;BR /&gt; %let delim=%sysfunc(ifc(%eval(&amp;amp;sysscp. = WIN),\,/));&lt;BR /&gt;/* macro download in work library */&lt;BR /&gt; %let download_from = %sysfunc(getoption(work))&amp;amp;delim.;&lt;BR /&gt; %put &amp;amp;download_from;&lt;/P&gt;
&lt;P&gt;%let bnd1=(5 2.56 2.26 1.64 0);&lt;/P&gt;
&lt;P&gt;DATA Kpi_dat; &lt;BR /&gt; INPUT Topic $1-6 subject $8-21 nmbr prv actl mn trgt mx cmmnts $49-159; &lt;BR /&gt; DATALINES; &lt;BR /&gt;Income Revenue 1 1.20 1.05 2.10 2.88 3.40 Need to prepare a turn around plan. Expected completion by 12/1/16.&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%macro slider(gname, actl, trgt,rng);&lt;/P&gt;
&lt;P&gt;goptions reset=all noborder &lt;BR /&gt; xpixels=80 ypixels=25 &lt;BR /&gt; ftext='Arial';&lt;/P&gt;
&lt;P&gt;ods graphics / reset=index; &lt;BR /&gt; ods html path="&amp;amp;download_from" (url=none) file="&amp;amp;gname..html" style=listing;&lt;BR /&gt; proc gkpi mode=raised;&lt;BR /&gt; hslider actual=&amp;amp;actl bounds=&amp;amp;&amp;amp;bnd&amp;amp;rng /&lt;BR /&gt; noavalue nobvalue&lt;BR /&gt; target=&amp;amp;trgt colors=(red,yellow,green,blue) &lt;BR /&gt; name="&amp;amp;gname";&lt;BR /&gt; run;&lt;BR /&gt; quit;&lt;BR /&gt; ods html close;&lt;/P&gt;
&lt;P&gt;%mend slider;&lt;/P&gt;
&lt;P&gt;data Kpi_rpt (keep=topic subject gname nmbr mn trgt mx actl clrFlg prv chng cmmnts);&lt;BR /&gt; set Kpi_dat;&lt;BR /&gt; &lt;BR /&gt; if mx &amp;gt; mn then chng=actl-prv;&lt;BR /&gt; if mx &amp;lt; mn then chng=prv-actl;&lt;/P&gt;
&lt;P&gt;if mx &amp;gt; mn then &lt;BR /&gt; do;&lt;BR /&gt; if mn &amp;gt; actl then clrFlg=1;&lt;BR /&gt; else if mn =&amp;lt; actl and actl &amp;lt; trgt then clrFlg=2;&lt;BR /&gt; else if trgt =&amp;lt; actl and actl &amp;lt; mx then clrFlg=3;&lt;BR /&gt; else if mx =&amp;lt; actl then clrFlg=4;&lt;BR /&gt; trgt_=trgt+trgt*0.05;&lt;BR /&gt; end;&lt;BR /&gt; else &lt;BR /&gt; do;&lt;BR /&gt; if mn &amp;lt; actl then clrFlg=1;&lt;BR /&gt; else if mn &amp;gt;= actl and actl &amp;gt; trgt then clrFlg=2;&lt;BR /&gt; else if trgt &amp;gt;= actl and actl &amp;gt; mx then clrFlg=3;&lt;BR /&gt; else if mx &amp;gt;= actl then clrFlg=4;&lt;BR /&gt; trgt_=trgt-trgt*0.05;&lt;BR /&gt; end;&lt;/P&gt;
&lt;P&gt;gnm=compress("Sldr"||_N_);&lt;BR /&gt; gname=trim("&amp;amp;download_from")||compress("Sldr"||_N_)||".png"; &lt;BR /&gt; txt='%slider('||gname||','||put(nmbr,4.1)||')'; put txt;&lt;BR /&gt; call execute('%slider('||trim(gnm)||','||put(actl,4.1)||','||put(trgt_,4.1)||','||nmbr||')');&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;ods pdf notoc file="&amp;amp;download_from.Test.pdf";&lt;/P&gt;
&lt;P&gt;proc report data=Kpi_rpt nowd wrap;&lt;/P&gt;
&lt;P&gt;column topic subject gname gsprk mn trgt mx actl slider cmmnts;&lt;/P&gt;
&lt;P&gt;define topic / order noprint;&lt;BR /&gt; define subject / display 'Metric' format=$superfmt. display ;&lt;BR /&gt; define gname / noprint;&lt;BR /&gt; define gsprk / noprint;&lt;BR /&gt; define mx / display 'Max' format=COMMA4.2 ;&lt;BR /&gt; define trgt / display 'Target' format=COMMA4.2 ;&lt;BR /&gt; define mn / display 'Min' format=COMMA4.2 ;&lt;BR /&gt; define actl / display 'Actual' format=COMMA4.2;&lt;BR /&gt; define slider / computed 'Current Month';&lt;BR /&gt; define cmmnts / display flow 'Comments';&lt;/P&gt;
&lt;P&gt;compute slider / char length=62;&lt;BR /&gt; slider=' ';&lt;BR /&gt; call define ('slider','style',"style=[preimage='"||trim(gname)||"']");&lt;BR /&gt; endcomp;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;ods pdf close;&lt;/P&gt;
&lt;P&gt;ods _all_ close;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 18:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/281219#M16218</guid>
      <dc:creator>Bryan</dc:creator>
      <dc:date>2016-06-29T18:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Unable to load image trying to load png</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/281574#M16231</link>
      <description>Hi:&lt;BR /&gt;  I'm not sure that your preimage is using the right location. When you create images to be used by PDF, the image has to be located in the place where PDF can find it and convert from the PNG file type to an internal PDF representation. When I use PREIMAGE, with ODS PDF or ODS RTF, Since you only have PATH= and not GPATH= in your code, I wonder whether your GNAME variable is actually holding the right location or, perhaps the numbering is "off" if you have run the program several times. PROC GKPI is not controlled by the ODS GRAPHICS statement, so if you are trying to use that to reset the index numbers, it won't work with GKPI -- which is controlled by GOPTIONS -- as shown in this example in the doc:&lt;BR /&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/graphref/67881/HTML/default/viewer.htm#p03xig9ryvv08mn1sd9592f79vh8.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/graphref/67881/HTML/default/viewer.htm#p03xig9ryvv08mn1sd9592f79vh8.htm&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;If it's not a location issue, then you might want to work with Tech Support on this.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Thu, 30 Jun 2016 21:37:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/281574#M16231</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-06-30T21:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Unable to load image trying to load png</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/281610#M16232</link>
      <description>&lt;P&gt;I changed a few things and this works fine for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* detect proper delim for UNIX vs. Windows */
 %let delim=%sysfunc(ifc(%eval(&amp;amp;sysscp. = WIN),\,/));
/* macro download in work library */
 %let download_from = %sysfunc(getoption(work))&amp;amp;delim.;
 %put &amp;amp;download_from;

%let bnd=(5 2.56 2.26 1.64 0);

DATA Kpi_dat; 
 INPUT Topic $1-6 subject $8-21 nmbr prv actl mn trgt mx cmmnts $49-159; 
 DATALINES; 
Income Revenue 1 1.20 1.05 2.10 2.88 3.40 Need to prepare a turn around plan. Expected completion by 12/1/16.
;
run;

%macro slider(gname, actl, trgt,rng);%macro _;%mend _;
goptions reset=all noborder  xpixels=80 ypixels=25  ftext='Arial';

ods graphics / reset=index; 
 ods html path="&amp;amp;download_from" (url=none) file="&amp;amp;gname..html" style=listing;
 proc gkpi mode=raised;
 hslider actual=&amp;amp;actl. bounds=&amp;amp;bnd. /
 noavalue nobvalue
 target=&amp;amp;trgt. colors=(red,yellow,green,blue) 
 name="&amp;amp;gname";
 run;
 quit;
 ods html close;

%mend slider;

data Kpi_rpt (keep=topic subject gname nmbr mn trgt mx actl clrFlg prv chng cmmnts);
 set Kpi_dat;

 if mx &amp;gt; mn then chng=actl-prv;
 if mx &amp;lt; mn then chng=prv-actl;

if mx &amp;gt; mn then  do;
 if mn &amp;gt; actl then clrFlg=1;
 else if mn =&amp;lt; actl and actl &amp;lt; trgt then clrFlg=2;
 else if trgt =&amp;lt; actl and actl &amp;lt; mx then clrFlg=3;
 else if mx =&amp;lt; actl then clrFlg=4;
 trgt_=trgt+trgt*0.05;
 end;
 else  do;
 if mn &amp;lt; actl then clrFlg=1;
 else if mn &amp;gt;= actl and actl &amp;gt; trgt then clrFlg=2;
 else if trgt &amp;gt;= actl and actl &amp;gt; mx then clrFlg=3;
 else if mx &amp;gt;= actl then clrFlg=4;
 trgt_=trgt-trgt*0.05;
 end;
 GNM=cats("Sldr",_N_);
 GNAME=cats("&amp;amp;download_from.Sldr",_N_,".png"); 
 TXT=cats('%slider(',GNAME,',',NMBR,')'); 
call execute(cats('%slider(',gnm,',',actl,',',trgt_,',',nmbr,')'));
run;

ods pdf notoc file="&amp;amp;download_from.Test.pdf";

proc report data=Kpi_rpt nowd wrap;

column topic subject gname gsprk mn trgt mx actl slider cmmnts;

define topic / order noprint;
 define subject / display 'Metric' format=$superfmt. display ;
 define gname / noprint;
 define gsprk / noprint;
 define mx / display 'Max' format=COMMA4.2 ;
 define trgt / display 'Target' format=COMMA4.2 ;
 define mn / display 'Min' format=COMMA4.2 ;
 define actl / display 'Actual' format=COMMA4.2;
 define slider / computed 'Current Month';
 define cmmnts / display flow 'Comments';

compute slider / char length=62;
 slider=' ';
 call define ('slider','style',"style=[preimage='"||trim(gname)||"']");
 endcomp;

run;

ods pdf close;

ods _all_ close;



&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="aaa1.PNG" alt="aaa1.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/3873i7A5EB69BB975BC70/image-size/original?v=v2&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 04:06:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/281610#M16232</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-07-01T04:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Unable to load image trying to load png</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/281923#M16244</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3289"&gt;@Bryan&lt;/a&gt; Have you solved the issue?&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jul 2016 22:52:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/281923#M16244</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-07-03T22:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Unable to load image trying to load png</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/282463#M16267</link>
      <description>&lt;P&gt;Added a gpath and still getting the same error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;goptions reset=all noborder xpixels=80 ypixels=25 ftext='Arial' ; ods graphics / reset=index; ods html &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;path="/sas/work/SAS_workF8B001B800A4_wasascsprd2.nu.com/SAS_workC06401B800A4_wasascsprd2.nu.com/"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2 + gpath="/sas/work/SAS_workF8B001B800A4_wasascsprd2.nu.com/SAS_workC06401B800A4_wasascsprd2.nu.com/" (url=none) &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;file="Sldr1.html" style=listing; proc gkpi mode=raised; hslider actual=2.88 bounds=(5 2.56 2.26 1.64 0) / noavalue nobvalue &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;target=. colors=&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;NOTE: Writing HTML Body file: Sldr1.html&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;3 +(red,yellow,green,blue) name="Sldr1"; run;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;ERROR: Unable to load image /sas/work/SAS_workF8B001B800A4_wasascsprd2.nu.com/SAS_workC06401B800A4_wasascsprd2.nu.com/Sldr1.png; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; default image will be used instead.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also verified that the file is in the directory and the file is not getting re-indexed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 16:02:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/282463#M16267</guid>
      <dc:creator>Bryan</dc:creator>
      <dc:date>2016-07-06T16:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Unable to load image trying to load png</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/282466#M16269</link>
      <description>&lt;P&gt;Sorry, was out on vacation, &amp;nbsp;tried the code above and still have the same problem, thanks for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 16:04:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/282466#M16269</guid>
      <dc:creator>Bryan</dc:creator>
      <dc:date>2016-07-06T16:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Unable to load image trying to load png</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/282532#M16274</link>
      <description>&lt;P&gt;Figured it out. &amp;nbsp;The filename was being saved out on the UNIX box as all lower case whereas in the code the first character was upper case, once I switched the code to lower case for the first character it worked, thanks for your input and help.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 19:33:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-Unable-to-load-image-trying-to-load-png/m-p/282532#M16274</guid>
      <dc:creator>Bryan</dc:creator>
      <dc:date>2016-07-06T19:33:20Z</dc:date>
    </item>
  </channel>
</rss>

