Usage Note 24303: Why does opening the ODS PRINTER destination
change the appearance of the graphs in my ODS HTML output?
When a
SAS/GRAPH procedure is invoked, it defines the layout of the graph under the current settings and sends the image to each of the output destinations. Because a graph has only one
layout regardless of the number of output destinations, the output for
each destination always looks the same.
When you start with a basic SAS job stream (with no ODS statements
at all), if you don't specify the TARGETDEVICE or
DEVICE options on the GOPTIONS statement, then the default device is used. For interactive SAS sessions, this is the display device. As a rule, display devices have a landscape orientation. When you add ODS HTML to the job, you don't change the target device at
all; you merely render another copy of it to the GIF device to create a
GIF image file. The GIF device driver is also landscape-oriented by default.
But if you add ODS PRINTER, you might see a difference in the output. The
printer does, in fact, have a physical page with a specific shape and
size. This page is usually portrait-orientated. To help the graph fit the page, the ODS PRINTER destination sets the TARGETDEVICE to the ODS PRINTER
device driver, SASPRTC (or SASPRTG or SASPRTB, depending on the color
support of the ODS PRINTER device).
Beause all ODS destinations are given the same output image, setting the TARGETDEVICE changes the appearance of the graphn in the ODS HTML output as well.
Here is the fix: Set TARGETDEVICE=GIF.
The ODS PRINTER code does not reset the
TARGETDEVICE if you have already set one yourself, so you
can override its decision by setting TARGETDEVICE
before or after the ODS PRINTER statement. At ODS PRINTER CLOSE time, if it
set the device, and the device is still set to an ODS
PRINTER device, then that value is cleared and returned to the default. Note that ODS PRINTER writes messages to the log about these actions.
Below is what the graph looks like when rendered incorrectly and correctly:
Operating System and Release Information
| SAS System | Base SAS | All | n/a | |
| SAS System | SAS/GRAPH | All | n/a | |
*
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.
| Type: | Usage Note |
| Priority: | low |
| Topic: | System Administration ==> Printing Query and Reporting ==> Creating Reports ==> Graphical SAS Reference ==> ODS (Output Delivery System)
|
| Date Modified: | 2007-08-28 14:45:43 |
| Date Created: | 2005-06-21 12:11:58 |