<?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: SAS 9.4: Using images in a proc report, troubles with ods pdf in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-9-4-Using-images-in-a-proc-report-troubles-with-ods-pdf/m-p/176283#M12513</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will it generate the PDF correctly with the HTML destination closed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jan 2015 18:16:36 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-01-09T18:16:36Z</dc:date>
    <item>
      <title>SAS 9.4: Using images in a proc report, troubles with ods pdf</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-9-4-Using-images-in-a-proc-report-troubles-with-ods-pdf/m-p/176282#M12512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;in order to migrate a&amp;nbsp; report in pdf from sas 9.2 to sas 9.4, I found some problems with a proc report that use an image as column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an example:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;ods pdf file='filepdf.pdf';&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ods html file='filehtml.htm';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;proc report data=sashelp.class nowd spanrows style(report)={rules=none frame=void }&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;style(column)={font_face=arial font_size=6pt vjust=center height=0.2in} ;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; column name sex age image ;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;define name / 'Name ' group order=data style(column)={ cellwidth=1.2in};&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; define age / analysis 'Age' ;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; define sex / group noprint '' ;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; define image / 'Sex' computed center;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; compute image /char;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; if _c2_='F' then do;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; call define(_col_,'style', 'style=[postimage="blue.jpg"]');&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; end;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; else do;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; call define(_col_,'style', 'style=[postimage="red.jpg" ]');&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; end;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; endcomp;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; run;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ods pdf close;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ods html close;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the html file, the code works fine, I have a table with an image for each row.&lt;BR /&gt;For the pdf file instead I have only an image above the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In sas 9.2&amp;nbsp; I didn't have any pproblem for both the destinations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks a lot for your help.&lt;/P&gt;&lt;P&gt;Grazia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 16:33:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-9-4-Using-images-in-a-proc-report-troubles-with-ods-pdf/m-p/176282#M12512</guid>
      <dc:creator>Grazia</dc:creator>
      <dc:date>2015-01-09T16:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4: Using images in a proc report, troubles with ods pdf</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-9-4-Using-images-in-a-proc-report-troubles-with-ods-pdf/m-p/176283#M12513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will it generate the PDF correctly with the HTML destination closed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 18:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-9-4-Using-images-in-a-proc-report-troubles-with-ods-pdf/m-p/176283#M12513</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-01-09T18:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4: Using images in a proc report, troubles with ods pdf</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-9-4-Using-images-in-a-proc-report-troubles-with-ods-pdf/m-p/176284#M12514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Generally speaking the rule of thumb is that&lt;/P&gt;&lt;P&gt;--HTML: the image location for pre/post image is the location where the image will be located at the time the HTML file is loaded into the browser &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;AFTER file creation &lt;/STRONG&gt;&lt;/SPAN&gt;(relative names without a path are OK here because the browser will look in the same directory as the HTML file)&lt;/P&gt;&lt;P&gt;--PDF: the image location for pre/post image is in the location where the image is located at the time the PDF file is CREATED or &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;DURING file creation &lt;/STRONG&gt;&lt;/SPAN&gt;(as ODS is building the PDF file) (relative names generally are NOT OK here)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; When I modify your code just slightly to specify the EXACT path for the image, the code works for me in HTML and in PDF. IF I only have a relative name without a path, then in SAS 9.4, the HTML uses the image (because if finds the image in the same location as the HTML when the file is rendered in the browser). But the PDF file doesn't show any image because I got this message in the log (without the c:\temp):&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;ERROR: Unable to load image red.jpg; default image will be used instead.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;ERROR: Unable to load image blue.jpg; default image will be used instead.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, you didn't mention an error message. I'm sure you would have mentioned if you had gotten such an error message. I did find this note, &lt;A href="http://support.sas.com/kb/40/319.html" title="http://support.sas.com/kb/40/319.html"&gt;40319 - "Unable to load image" error might be received when sending output to an ODS PRINTER (PCL/PDF/PS) destination&lt;/A&gt; but it doesn't seem to be relevant to your code. Or I found this note. &lt;A href="http://support.sas.com/kb/34/722.html" title="http://support.sas.com/kb/34/722.html"&gt;34722 - JPEG image used in ODS RTF, PDF, or HTML might generate errors&lt;/A&gt; That would be a question for Tech Support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the attached screen shot of the PDF file. It was created with the code below. All I know is that I got an error with the relative name of the file and I did not get an error with the fully qualified path for the image location. My red.jpg is a red star and my blue.jpg is a blue star. They looked bad with such a small font for name, so I increased the font size for the name.&lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods pdf file='c:\temp\filepdf.pdf';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods html file='c:\temp\filehtml.htm';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc report data=sashelp.class nowd spanrows &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(report)={rules=none frame=void }&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={font_face=arial font_size=12pt vjust=center} ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; column name sex age image ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; define name / 'Name ' group order=data style(column)={cellwidth=1.2in};&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; define sex / group noprint '' ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; define age / analysis 'Age' ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; define image / 'Sex' computed center;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; compute image /char;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if sex='F' then do;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_col_,'style', 'style=[postimage="c:\temp\blue.jpg"]');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else do;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_col_,'style', 'style=[postimage="c:\temp\red.jpg" ]');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods pdf close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods html close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11857iDFEED3846618BE0A/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="red_blue.png" title="red_blue.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 21:09:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-9-4-Using-images-in-a-proc-report-troubles-with-ods-pdf/m-p/176284#M12514</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-01-09T21:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4: Using images in a proc report, troubles with ods pdf</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-9-4-Using-images-in-a-proc-report-troubles-with-ods-pdf/m-p/176285#M12515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ballardw,&lt;/P&gt;&lt;P&gt;It gives the same error, the first time I run the code it was to refresh a pdf report created with sas 9.2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The report is made using ods absolute layout and it's very rich, so I tried to semplify the code to reduce the complexity, and I used the html destination as double check.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 21:57:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-9-4-Using-images-in-a-proc-report-troubles-with-ods-pdf/m-p/176285#M12515</guid>
      <dc:creator>Grazia</dc:creator>
      <dc:date>2015-01-09T21:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4: Using images in a proc report, troubles with ods pdf</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-9-4-Using-images-in-a-proc-report-troubles-with-ods-pdf/m-p/176286#M12516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your answer Cynthia.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the real code the paths are fully qualified.&lt;/P&gt;&lt;P&gt;I got the images, but just one and in a very wrong position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But your answer is a good news, because if the code&amp;nbsp; is working for you, maybe I should just check my installation with the tech support to see if there is some hot fix missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 22:02:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-9-4-Using-images-in-a-proc-report-troubles-with-ods-pdf/m-p/176286#M12516</guid>
      <dc:creator>Grazia</dc:creator>
      <dc:date>2015-01-09T22:02:49Z</dc:date>
    </item>
  </channel>
</rss>

