Usage Note 35798: Tables wrap in RTF and PDF destinations if CELLWIDTH values total 100%
If individual CELLWIDTH values are given in percentages for columns with procedures TEMPLATE, REPORT, PRINT, or TABULATE, and the total for the table is 100%, the table might wrap on the page or across pages. The CELLWIDTH specification on the columns does not take into account the borders (grid lines), so if the total adds up to 100%, there is slightly more width needed for the entire table, causing it to wrap.
To circumvent the problem, use percentages that add up to 98-99% in order to use the full width of the page, but prevent the table from wrapping. Please see the Full Code tab for an example.
Operating System and Release Information
| SAS System | Base SAS | z/OS | 9 TS M0 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9 TS M0 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9 TS M0 | |
| Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
| Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
| Microsoft Windows 2000 Server | 9 TS M0 | |
| Microsoft Windows 2000 Professional | 9 TS M0 | |
| Microsoft Windows NT Workstation | 9 TS M0 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9 TS M0 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9 TS M0 | |
| Microsoft Windows Server 2003 Standard Edition | 9 TS M0 | |
| Microsoft Windows XP Professional | 9 TS M0 | |
| 64-bit Enabled AIX | 9 TS M0 | |
| 64-bit Enabled HP-UX | 9 TS M0 | |
| 64-bit Enabled Solaris | 9 TS M0 | |
| HP-UX IPF | 9 TS M0 | |
| Linux | 9 TS M0 | |
| OpenVMS Alpha | 9 TS M0 | |
| Tru64 UNIX | 9 TS M0 | |
*
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.
The sample code first shows CELLWIDTH values which add up to 100% and create a wrapped table. The workaround code shows CELLWIDTH values which add up to 98.5%, and create a single table with all five columns across each page.
options papersize=letter orientation=portrait;
/* PROBLEM */
ods rtf file="wrapped.rtf";
ods pdf file="wrapped.pdf" notoc;
title "PROBLEM - CELLWIDTHs add up to 100%";
proc report nowd data=sashelp.class style(column)={cellwidth=20%};
run;
ods _all_ close;
/* SOLUTION */
ods rtf file="not_wrapped.rtf";
ods pdf file="not_wrapped.pdf" notoc;
title "SOLUTION - CELLWIDTHs add up to 98.5%";
proc report nowd data=sashelp.class style(column)={cellwidth=19.7%};
run;
ods _all_ close;
Tables will wrap in RTF and PDF destinations if CELLWIDTH values total 100%.
| Date Modified: | 2009-05-05 11:26:15 |
| Date Created: | 2009-05-05 08:12:12 |