Problem Note 44269: The STARTPAGE=NOW option in the ODS RTF statement might result in incorrect titles or footnotes
The STARTPAGE=NOW option in the ODS RTF statement attempts to force an immediate page break. If no table or text follows an ODS RTF statement containing the STARTPAGE=NOW option, the last active TITLE (or FOOTNOTE) statement is displayed in the ODS RTF file.
The sample code on the Full Code tab illustrates the problem and provides a workaround.
Operating System and Release Information
SAS System | Base SAS | 64-bit Enabled AIX | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 TS1M0 | |
Windows Vista | 9.3 TS1M0 | |
Windows 7 Ultimate x64 | 9.3 TS1M0 | |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | |
Windows 7 Professional x64 | 9.3 TS1M0 | |
Windows 7 Professional 32 bit | 9.3 TS1M0 | |
Windows 7 Home Premium x64 | 9.3 TS1M0 | |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | |
Windows 7 Enterprise x64 | 9.3 TS1M0 | |
Microsoft Windows XP Professional | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | |
z/OS | 9.3 TS1M0 | |
Z64 | 9.3 TS1M0 | |
Microsoft® Windows® for x64 | 9.3 TS1M0 | |
64-bit Enabled HP-UX | 9.3 TS1M0 | |
64-bit Enabled Solaris | 9.3 TS1M0 | |
HP-UX IPF | 9.3 TS1M0 | |
Linux | 9.3 TS1M0 | |
Linux for x64 | 9.3 TS1M0 | |
Solaris for x64 | 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 illustrates the use of the STARTPAGE=NOW option in an ODS RTF statement. Since there is no table or text for a second page of output, this option in the RTF statements causes the second title to be the active title.
The workaround is to remove an extraneous ODS RTF statement that contains the STARTPAGE=NOW option. You can also use macro logic to determine whether a table or text follows the second TITLE1 statement. If no table or text follows, the second TITLE1 statement should not be issued.
/* The following code illustrates the problem */
footnote "&sysver";
ods rtf file="Problem_&sysver..rtf";
title1 'Correct title - the SASHELP.CLASS data set';
proc print data=sashelp.class;
run;
ods rtf startpage=now;
title1 'A title that is not supposed to be printed';
ods rtf startpage=now;
ods rtf close;
/* The following code provides a workaround */
footnote "&sysver";
ods rtf file="Workaround_&sysver..rtf";
title1 'Correct title - the SASHELP.CLASS data set';
proc print data=sashelp.class;
run;
ods rtf startpage=now;
title1 'A title that is not supposed to be printed';
ods rtf close;
The STARTPAGE=NOW option in the ODS RTF statement might result in incorrect titles or footnotes.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2011-10-11 14:30:34 |
Date Created: | 2011-09-12 16:10:47 |