Sample 42743: Customize borders in PDF and RTF output using PROC REPORT
The PROC REPORT BREAK and RBREAK statement options OL and UL only apply to the LISTING destination. This sample illustrates how to mimic these options in the PDF and RTF destinations.
The following style attributes are available starting in SAS 9.2:
-
BORDERBOTTOMCOLOR
-
BORDERTOPCOLOR
-
BORDERBOTTOMWIDTH
-
BORDERTOPWIDTH
These can be used on the BREAK and RBREAK statements' style attributes to customize borders created in PDF and RTF tables.
Please note: The style attributes BORDERBOTTOMSTYLE and BORDERTOPSTYLE allow the DUL and DOL options to be mimiced in the RTF destination. The BORDER<location>STYLE attribute is not valid in the ODS PRINTER (PCL/PDF/PS) destinations. For additional information about these style attributes, please see the SAS Online documentation: Style Attributes and Their Values
.
Please see the code on the Full Code tab for an illustration of the new style attributes.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample code illustrates how to mimic PROC REPORT's BREAK and RBREAK options, OL and UL, in the PDF and RTF destinations. The BORDER
WIDTH and BORDERCOLOR style attributes are used on the BREAK AFTER and RBREAK AFTER statements. The BORDERBOTTOMSTYLE=double shows how to mimic the DUL option in the RTF destination only.
ods rtf file="&sysver.file.rtf" style=sasdocprinter;
ods pdf file="&sysver.file.pdf" style=sasdocprinter notoc;
title "Created with SAS &sysver";
proc report nowd data=sashelp.cars;
col origin cylinders mpg_highway;
define origin / group;
define cylinders / group;
define mpg_highway / mean format=8.;
break after origin / summarize
style={borderbottomstyle=double borderbottomcolor=black borderbottomwidth=1pt};
rbreak after / summarize
style={bordertopcolor=black bordertopwidth=1pt};
run;
ods _all_ close;
ods listing;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
The BREAK and RBREAK statement options OL and UL only apply to the LISTING destination. This sample code illustrates how to mimic these options in the PDF and RTF destinations.
Date Modified: | 2011-03-29 16:05:16 |
Date Created: | 2011-03-22 09:36:12 |
Operating System and Release Information
SAS System | N/A | z/OS | 9.2 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |
Microsoft® Windows® for x64 | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |
Microsoft Windows XP Professional | 9.2 TS1M0 | |
Windows Vista | 9.2 TS1M0 | |
Windows Vista for x64 | 9.2 TS1M0 | |
64-bit Enabled AIX | 9.2 TS1M0 | |
64-bit Enabled HP-UX | 9.2 TS1M0 | |
64-bit Enabled Solaris | 9.2 TS1M0 | |
HP-UX IPF | 9.2 TS1M0 | |
Linux | 9.2 TS1M0 | |
Linux for x64 | 9.2 TS1M0 | |
OpenVMS on HP Integrity | 9.2 TS1M0 | |
Solaris for x64 | 9.2 TS1M0 | |