Usage Note 34138: Including an image or banner file in stored process output
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:
- unc path
- http address
- path to a directory and file on disk
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:
- A UNC path that references a network shared directory is the most reliable method to display an image in stored process output across different client applications and output types. Use a UNC path for your image reference if you plan to distribute your stored processes on multiple client applications, or, if your users produce non-HTML output.
- A URL reference for the image file can only be used when the stored process produces HTML output. The following errors might occur if you specify a URL reference with other output types:
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.
- 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.
Operating System and Release Information
SAS System | SAS Integration Technologies | z/OS | 9.1 TS1M3 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 | |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 | |
Microsoft® Windows® for x64 | 9.1 TS1M3 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 | |
Microsoft Windows XP Professional | 9.1 TS1M3 | |
Windows Vista | 9.1 TS1M3 | |
64-bit Enabled AIX | 9.1 TS1M3 | |
64-bit Enabled HP-UX | 9.1 TS1M3 | |
64-bit Enabled Solaris | 9.1 TS1M3 | |
HP-UX IPF | 9.1 TS1M3 | |
Linux | 9.1 TS1M3 | |
OpenVMS Alpha | 9.1 TS1M3 | |
Tru64 UNIX | 9.1 TS1M3 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Date Modified: | 2009-01-30 15:22:22 |
Date Created: | 2008-12-08 10:18:28 |