Hi, Matteo:
Well...hmmm....
1) when I have my picture stored in c:\temp\kermit.jpg
AND
2) I use c:\temp\kermit.jpg in the preimage
I do get the image in my HTML output file.
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.
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:
preimage="http://www.sesame.com/dir/subdir/kermit.jpg"
At this point, here are some things you can do:
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.
2) double check your image -- make sure that you have the right location and the right spelling for the image file
3) double check your syntax -- make sure that you DO have an ODS ESCAPECHAR statement:
ODS ESCAPECHAR='^'; AND
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=
'^S={preimage="c:\temp\kermit.jpg"}^nthird'
Note in the example above that the word
third is my label string. And also note that the attribute
preimage="c:\temp\kermit.jpg" 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.
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.
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.
Also, if you are using macro variables, I suggest you get the program working WITHOUT macro variables or macro quoting issues involved.
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:
http://support.sas.com/techsup/contact/index.html
Good luck!
cynthia