ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
efo4life
Calcite | Level 5

Hi,

 

I am trying to insert an image into a PDF document I am creating thru SAS but I am running thru a host of problems. I saw some codes on here which I tried but it didn't work.

 

One of the errors I am getting is this:

Unrecognized SAS option name ESCAPECHAR

 

Also the image doesn't load into my pdf document.

 

Please can anyone help with a simple piece of code that works.

 

Thanks,

 

Efe

 

 

 

 

2 REPLIES 2
ballardw
Super User

Please provide the code you are attempting. Best would be the code from the log with the error message.

 

Also, which version of SAS are you running?

Cynthia_sas
SAS Super FREQ
Hi:
ESCAPECHAR is NOT a system option. It is a separate statement:
ODS ESCAPECHAR='^';
to declare your ESCAPECHAR to use for inline formatting.

Also, the image will not even be attempted by ODS until the ESCAPECHAR syntax is correct. So posting your code will be useful.

This documentation example shows you the correct syntax for everything except PREIMAGE:
http://support.sas.com/documentation/cdl/en/odsug/67921/HTML/default/viewer.htm#p11xia2ltavr8ln17srq...

My suggestion is that, if you don't want to post your code, you should try to get this documentation example working and then once it works, look at using PREIMAGE to get your image into the PDF document following this example:
http://support.sas.com/kb/24/229.html

My only additional comment to the above Tech Support note is that ODS PDF has to be able to FIND the image at the point in time when the PDF file is being created, so if a relative name for the file location does not work, try an absolute path.

title j=l '^S={preimage="saslogo.jpg"}';
OR
title j=l '^S={preimage="c:\images\saslogo.jpg"}';

cynthia

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 6115 views
  • 0 likes
  • 3 in conversation