Usage Note 15727: Writing "PAGE X of Y" in ODS RTF does not work with the BODYTITLE option
Raw RTF code or the inline style function PAGEOF can be used in a TITLE or FOOTNOTE statement to write "PAGE X of Y" text in RTF output. However, if the BODYTITLE option is also used in the ODS RTF statement, the PAGEOF information is not written as expected.
This is the intended behavior. The PAGEOF information is designed to be written in the header or footer areas of a document. The BODYTITLE option removes the TITLE/FOOTNOTE from the header/footer section of an RTF file.
If the desired location of the page numbering is in the header or footer section of the RTF file, then the BODYTITLE option must be removed or Microsoft Word must be used to set the page numbering format.
An alternative is to use the TEMPLATE procedure to write "Page X of Y", which places the PAGEOF information in the upper right corner of each page. The code below applies to the default page number location only, and requires the NUMBER option to be in effect.
ods escapechar='^';
proc template;
define style styles.test;
parent=styles.rtf;
style pageno from pageno /
font=fonts("strongfont")
posttext=" of ^{lastpage} ";
end;
run;
options number;
ods listing close;
ods rtf file='test.rtf' style=styles.test;
proc print data=sashelp.class noobs;
run;
ods rtf close;
ods listing;
Operating System and Release Information
SAS System | Base SAS | Microsoft Windows NT Workstation | 9.1 TS1M0 | |
Microsoft Windows XP Professional | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M0 | |
Microsoft Windows 2000 Professional | 9.1 TS1M0 | |
Microsoft Windows 2000 Server | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M0 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M0 | |
64-bit Enabled Solaris | 9.1 TS1M0 | |
z/OS | 9.1 TS1M0 | |
Linux | 9.1 TS1M0 | |
HP-UX IPF | 9.1 TS1M0 | |
64-bit Enabled HP-UX | 9.1 TS1M0 | |
OpenVMS Alpha | 9.1 TS1M0 | |
64-bit Enabled AIX | 9.1 TS1M0 | |
Tru64 UNIX | 9.1 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.
Type: | Usage Note |
Priority: | |
Topic: | SAS Reference ==> ODS (Output Delivery System)
|
Date Modified: | 2006-01-17 11:23:28 |
Date Created: | 2005-07-08 13:46:10 |