<?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: Inserting a png file in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-a-png-file/m-p/548630#M22620</link>
    <description>Hi:&lt;BR /&gt;  When you're using PDF, my understanding was that it was best to make the size of the PNG or JPG file close to the final size you wanted to insert into the document.&lt;BR /&gt;&lt;BR /&gt;  PREIMAGE in the TITLE is typically used for a logo. If you are trying to get a picture of a teacher into a cell inside PROC REPORT, then you'll want to use a technique more like what I show on page 11 of this paper &lt;A href="https://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf&lt;/A&gt; where you see the preimage used as part of a COMPUTE block. Or, you see it used in pages 14/15 of this paper &lt;A href="https://support.sas.com/resources/papers/proceedings/proceedings/forum2007/099-2007.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings/proceedings/forum2007/099-2007.pdf&lt;/A&gt; to put a picture of a shoe in each cell (although I think that example was postimage, not preimage) and it did the picture insertion with the help of a user-defined format.&lt;BR /&gt;Cynthia&lt;BR /&gt;</description>
    <pubDate>Thu, 04 Apr 2019 19:46:57 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2019-04-04T19:46:57Z</dc:date>
    <item>
      <title>Inserting a png file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-a-png-file/m-p/548625#M22619</link>
      <description>&lt;P&gt;I just taught this to myself so it's clunky. I'm sure the image shouldn't be in a title statement. The picture in the pdf output is spanning two pages. I want to contain it to one&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;log message:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;WARNING: A cell has been created which is taller than a page. Some output types will not render it correctly.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let tch=Mrs. Smith;
/* WHO IS YOUR TEACHER */
options nodate;
ods pdf file="I:\My Drive\Schools\Ridge Elementary\&amp;amp;tch..pdf" dpi=300;
ods escapechar='~';
proc report data=tch style(header)=[font_size=10];
where teacher="&amp;amp;tch";
column teacher;
define teacher / style=[font_size=14];
title1 height=30pt "I bet I can guess who your teacher is.";
title2 '~S={preimage="I:\My Drive\Schools\Ridge Elementary\&amp;amp;tch..png"} ';
*footnote '~S={preimage="I:\My Drive\Schools\Ridge Elementary\bres.png"} ';
run;
ods pdf close; 
title;
footnote;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Apr 2019 19:25:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-a-png-file/m-p/548625#M22619</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2019-04-04T19:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting a png file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-a-png-file/m-p/548630#M22620</link>
      <description>Hi:&lt;BR /&gt;  When you're using PDF, my understanding was that it was best to make the size of the PNG or JPG file close to the final size you wanted to insert into the document.&lt;BR /&gt;&lt;BR /&gt;  PREIMAGE in the TITLE is typically used for a logo. If you are trying to get a picture of a teacher into a cell inside PROC REPORT, then you'll want to use a technique more like what I show on page 11 of this paper &lt;A href="https://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf&lt;/A&gt; where you see the preimage used as part of a COMPUTE block. Or, you see it used in pages 14/15 of this paper &lt;A href="https://support.sas.com/resources/papers/proceedings/proceedings/forum2007/099-2007.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings/proceedings/forum2007/099-2007.pdf&lt;/A&gt; to put a picture of a shoe in each cell (although I think that example was postimage, not preimage) and it did the picture insertion with the help of a user-defined format.&lt;BR /&gt;Cynthia&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Apr 2019 19:46:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-a-png-file/m-p/548630#M22620</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-04-04T19:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting a png file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-a-png-file/m-p/548632#M22621</link>
      <description>&lt;P&gt;There are some questions to answer:&lt;/P&gt;
&lt;P&gt;Do you &lt;STRONG&gt;want&lt;/STRONG&gt; the image to appear with title or just before the Proc Report output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does your Report output span more than one page? That will cause the Title to repeat generally.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want the image in the title perhaps adjusting the&amp;nbsp;paper size so the report doesn't go past one table.&lt;/P&gt;
&lt;P&gt;You can use the OPTIONS statement to specify the PAPERSIZE to be different than your default such as :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;options papersize=(10in, 17in);&lt;/PRE&gt;
&lt;P&gt;If you just one the image to appear once before the report without considering the Title at all try&lt;/P&gt;
&lt;PRE&gt;proc report data=tch 
   style(header)=[font_size=10]
   style(report)=[preimage="I:\My Drive\Schools\Ridge Elementary\&amp;amp;tch..png"]
;&lt;/PRE&gt;
&lt;P&gt;Don't use your current title2 statement.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 19:53:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-a-png-file/m-p/548632#M22621</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-04T19:53:03Z</dc:date>
    </item>
  </channel>
</rss>

