<?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: How to insert image into proc report in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-image-into-proc-report/m-p/2457#M1051</link>
    <description>Cynthia,&lt;BR /&gt;
in the results of your examples I don't have the label "third" but the label "nthird".&lt;BR /&gt;
This means that my version (8.2) doesn't recognize the escapechar?&lt;BR /&gt;
I think I'll contact the support....</description>
    <pubDate>Fri, 09 Mar 2007 16:18:45 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-03-09T16:18:45Z</dc:date>
    <item>
      <title>How to insert image into proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-image-into-proc-report/m-p/2453#M1047</link>
      <description>Hi all, &lt;BR /&gt;
&lt;BR /&gt;
I need to insert an image into the table of the PROC REPORT (in the &lt;BR /&gt;
box upper left of the table). &lt;BR /&gt;
With the proc tabulate it works and the syntax is &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
PROC TABULATE data=....; &lt;BR /&gt;
VAR ...; &lt;BR /&gt;
CLASS .... &lt;BR /&gt;
/ BOX={STYLE={preimage="image.bmp"}}; &lt;BR /&gt;
RUN; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
But with the proc report, after many attempts, I was able to insert &lt;BR /&gt;
the image only before the table as you can try with the code below. &lt;BR /&gt;
Any idea? &lt;BR /&gt;
Thanks in advance &lt;BR /&gt;
Matteo&lt;BR /&gt;
&lt;BR /&gt;
data example; &lt;BR /&gt;
analisys=100;second=1000;third='ex1';number=100;output; &lt;BR /&gt;
analisys=200;second=2000;third='ex1';number=200;output; &lt;BR /&gt;
analisys=300;second=1000;third='ex2';number=300;output; &lt;BR /&gt;
analisys=400;second=2000;third='ex2';number=400;output; &lt;BR /&gt;
run; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc report data=example missing nowindows &lt;BR /&gt;
style(report)={preimage="image..bmp"};; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
column third second,( analisys number); &lt;BR /&gt;
define third / group 'third'; &lt;BR /&gt;
define second / display across 'second'; &lt;BR /&gt;
define analisys  /analysis '' ; &lt;BR /&gt;
define number / analysis ''; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
rbreak after / summarize;  run;</description>
      <pubDate>Thu, 08 Mar 2007 21:42:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-image-into-proc-report/m-p/2453#M1047</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-03-08T21:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert image into proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-image-into-proc-report/m-p/2454#M1048</link>
      <description>Hi...you CAN make the preimage part of the style for the label for that upper cell...but it would actually be placed on top of any text you have in that cell. So, for example, let's say you have a picture of Kermit the Frog, located at: c:\temp\kermit.jpg&lt;BR /&gt;
       &lt;BR /&gt;
Here are a couple of examples you could use to put that image into a header cell above the text 'third':&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods html path='c:\temp' (url=none)&lt;BR /&gt;
         file='kermie.html' style=sasweb;&lt;BR /&gt;
          &lt;BR /&gt;
ods escapechar='^';&lt;BR /&gt;
               &lt;BR /&gt;
proc report data=example missing nowindows;&lt;BR /&gt;
  title 'one way';&lt;BR /&gt;
  column ('^S={preimage="c:\temp\kermit.jpg"}^nthird'    third) ('Second' second,( analisys number)); &lt;BR /&gt;
  define third / group ' ' ; &lt;BR /&gt;
  define second / display across ' '&lt;BR /&gt;
     style(header)={vjust=b}; &lt;BR /&gt;
  define analisys /analysis ' ' ; &lt;BR /&gt;
  define number / analysis ' '; &lt;BR /&gt;
  rbreak after / summarize; &lt;BR /&gt;
run; &lt;BR /&gt;
                    &lt;BR /&gt;
proc report data=example missing nowindows;&lt;BR /&gt;
  title 'another way';&lt;BR /&gt;
  column third second,( analisys number); &lt;BR /&gt;
  define third / group '^S={preimage="c:\temp\kermit.jpg"}^nthird'; &lt;BR /&gt;
  define second / display across 'second'; &lt;BR /&gt;
  define analisys /analysis ' ' ; &lt;BR /&gt;
  define number / analysis ' '; &lt;BR /&gt;
  rbreak after / summarize; &lt;BR /&gt;
run; &lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
  &lt;BR /&gt;
Proc Report does not have a away to directly address the box at the very upper left hand corner (this box occurs when you have multiple and sometimes spanning headers above the columns that have the side effect of creating an empty box that looks exactly like the TABULATE box, but isn't at all like the TABULATE BOX area.&lt;BR /&gt;
  &lt;BR /&gt;
This example uses ODS ESCAPECHAR to put a style attribute in a very specific place -- above the label for the "third" column. The style attribute is the preimage attribute and it is going to carry the information for the picture.&lt;BR /&gt;
Have fun!&lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 08 Mar 2007 23:23:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-image-into-proc-report/m-p/2454#M1048</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-03-08T23:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert image into proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-image-into-proc-report/m-p/2455#M1049</link>
      <description>Hi Cynthia,&lt;BR /&gt;
I tried with your two examples but in both cases I have the two reports WITHOUT the image and no error log.&lt;BR /&gt;
Do you have idea where is the problem?&lt;BR /&gt;
Thanks in advance&lt;BR /&gt;
Matteo</description>
      <pubDate>Fri, 09 Mar 2007 13:42:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-image-into-proc-report/m-p/2455#M1049</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-03-09T13:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert image into proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-image-into-proc-report/m-p/2456#M1050</link>
      <description>Hi, Matteo:&lt;BR /&gt;
  Well...hmmm....&lt;BR /&gt;
1) when I have my picture stored in c:\temp\kermit.jpg&lt;BR /&gt;
AND&lt;BR /&gt;
2) I use c:\temp\kermit.jpg in the preimage&lt;BR /&gt;
I do get the image in my HTML output file.&lt;BR /&gt;
&lt;BR /&gt;
If you are using RTF or PDF as the ODS destination, you might not see the image because the image is translated from the original form to an internal form used by PDF and RTF. Therefore, the image location must be the place where ODS will find the image when the output file is CREATED. On the other hand, the image location for HTML must be the location where the output file and image file will be when the output file is RENDERED. &lt;BR /&gt;
  &lt;BR /&gt;
So if, for example, you kept the image in C:\temp and subsequently moved the HTML file to a web server -- without moving the image -- then you would not see the image. In addition, if the ultimate location of the image is a web server for example AND the image may be stored in a sub-directory on the web server, then you might need to change the preimage attribute to something like this:&lt;BR /&gt;
  &lt;BR /&gt;
preimage="http://www.sesame.com/dir/subdir/kermit.jpg"&lt;BR /&gt;
    &lt;BR /&gt;
At this point, here are some things you can do:&lt;BR /&gt;
1) double check your version of SAS. ODS ESCAPECHAR was first introduced in SAS 8.2 (I think) so if you are running an older version of SAS, I would not expect this example to work.&lt;BR /&gt;
2) double check your image -- make sure that you have the right location and the right spelling for the image file&lt;BR /&gt;
3) double check your syntax -- make sure that you DO have an ODS ESCAPECHAR statement:&lt;BR /&gt;
ODS ESCAPECHAR='^'; AND&lt;BR /&gt;
4)double check that the character used in the ODS ESCAPECHAR statement is the same as the one used in your style= override with escapechar=&lt;BR /&gt;
'^S={preimage="c:\temp\kermit.jpg"}^nthird'  &lt;BR /&gt;
    &lt;BR /&gt;
Note in the example above that the word &lt;B&gt;third&lt;/B&gt; is my label string. And also note that the attribute &lt;B&gt;preimage="c:\temp\kermit.jpg"&lt;/B&gt; is in double quotes. That means my WHOLE string -- the one with ESCAPECHAR ^S= AND the preimage override AND the label text must be enclosed in single quotes or vice versa. &lt;BR /&gt;
&lt;BR /&gt;
and 5) double check the image itself and make sure that you can open the image file in a browser window or with a paint program (without SAS being involved) to ensure that the image -is- there and is a good, usable image.&lt;BR /&gt;
  &lt;BR /&gt;
The ESCAPECHAR control string will NOT be used by the LISTING destination, but SHOULD be used in destinations that support style overrides....so the whole string that I am using, in my example, is enclosed in single quotes and the preimage text is enclosed in double quotes within the single quotes.&lt;BR /&gt;
      &lt;BR /&gt;
Also, if you are using macro variables, I suggest you get the program working WITHOUT macro variables or macro quoting issues involved.&lt;BR /&gt;
  &lt;BR /&gt;
If you are running SAS 8.2 or higher and if you have checked your syntax and quoting and picture, then I think your best bet for further help is to contact SAS Technical Support:&lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/contact/index.html" target="_blank"&gt;http://support.sas.com/techsup/contact/index.html&lt;/A&gt;&lt;BR /&gt;
  &lt;BR /&gt;
Good luck!&lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 09 Mar 2007 15:02:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-image-into-proc-report/m-p/2456#M1050</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-03-09T15:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert image into proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-image-into-proc-report/m-p/2457#M1051</link>
      <description>Cynthia,&lt;BR /&gt;
in the results of your examples I don't have the label "third" but the label "nthird".&lt;BR /&gt;
This means that my version (8.2) doesn't recognize the escapechar?&lt;BR /&gt;
I think I'll contact the support....</description>
      <pubDate>Fri, 09 Mar 2007 16:18:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-image-into-proc-report/m-p/2457#M1051</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-03-09T16:18:45Z</dc:date>
    </item>
  </channel>
</rss>

