A common method to include custom image files or banner files in SAS stored process output is to use the "preimage" tag in the TITLE or FOOTNOTE of procedure output. Dependent upon the environment in which the stored process is executed, this preimage reference can be one of the following, in order of preference:
The following code example shows these three methods to specify an image file at the top of a report:
*ProcessBody;
%stpbegin;
ods escapechar = "^";
title1 justify=center '^S={preimage="\\myserver\myimages\logo.jpg"}'; /* UNC path */
title2 justify=left '^S={preimage="http://myserver:8080/logo.jpg"}'; /* URL */
title3 justify=right '^S={preimage="c:\myimages\logo.jpg"}'; /* Path on disk */
proc print data=sashelp.class;
run;
%stpend;
However, dependent upon the client application (such as SAS® Enterprise Guide, Add-in for Microsoft Office, Stored Process Web Application, or SAS® Information Delivery Portal) and the output type produced by the stored process (such as HTML, PDF, or RTF), the image might not appear and an error message might occur. Accordingly, you should consider the following information when you specify a "preimage" tag in a SAS stored process:
ERROR: Bad image http://web.server/logo.jpg: URLs are not supported in printer images;
default image will be used instead.
ERROR: A component of <BIConfigDir>\Lev1\SASMain\http:\\web.server\logo.jpg is not a directory.
3. A physical path on disk is the least reliable method for referencing an image file in stored process output. Although this method might work in some circumstances, the path might not be accessible from other systems and client applications.