Problem Note 41165: The STARTPAGE=YES/ON option does not work if ODS SELECT or ODS EXCLUDE is used with ODS RTF output
When the STARTPAGE= option is set to NO or OFF, and ODS SELECT or ODS EXCLUDE statements are used to control the output placed in an RTF file, STARTPAGE=YES or STARTPAGE=ON might not force a page break. It will be necessary to specify STARTPAGE=NOW before the ODS SELECT or ODS EXCLUDE statements in order to force a page break on tables which should appear on a separate page in the RTF file.
The example code on the Full Code tab illustrates the problem and the circumvention.
Operating System and Release Information
SAS System | Base SAS | OpenVMS on HP Integrity | 9.2 TS1M0 | 9.3 TS1M0 |
Solaris for x64 | 9.2 TS1M0 | 9.3 TS1M0 |
Linux | 9.2 TS1M0 | 9.3 TS1M0 |
Linux for x64 | 9.2 TS1M0 | 9.3 TS1M0 |
HP-UX IPF | 9.2 TS1M0 | 9.3 TS1M0 |
64-bit Enabled HP-UX | 9.2 TS1M0 | 9.3 TS1M0 |
64-bit Enabled Solaris | 9.2 TS1M0 | 9.3 TS1M0 |
64-bit Enabled AIX | 9.2 TS1M0 | 9.3 TS1M0 |
Windows Vista | 9.2 TS1M0 | 9.3 TS1M0 |
Windows Vista for x64 | 9.2 TS1M0 | 9.3 TS1M0 |
z/OS | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft® Windows® for x64 | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | 9.3 TS1M0 |
*
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 below creates two RTF files. PROBLEM.RTF does not paginate with the STARTPAGE=YES option in effect. SOLUTION.RTF uses the STARTPAGE=NOW option before the ODS EXCLUDE block to create the desired page break.
/* The following code illustrates the problem */
ods rtf file="problem.rtf";
ods rtf startpage=no;
proc report data=sashelp.class nowd missing;
run;
/* Change to STARTPAGE=NOW to work in SAS 9.2 */
ods rtf startpage=yes;
ods exclude all;
proc datasets lib=work;
run;
quit;
ods exclude none;
ods rtf startpage=yes;
proc report data=sashelp.class nowd missing;
run;
ods rtf close;
/* The following code illustrates the workaround */
ods rtf file="solution.rtf";
ods rtf startpage=no;
proc report data=sashelp.class nowd missing;
run;
/* Changed to STARTPAGE=NOW to work in SAS 9.2 */
ods rtf startpage=now;
ods exclude all;
proc datasets lib=work;
run;
quit;
ods exclude none;
ods rtf startpage=yes;
proc report data=sashelp.class nowd missing;
run;
ods rtf close;
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2010-10-25 14:43:03 |
Date Created: | 2010-10-07 13:59:32 |