Sample 46576: Create a title page in ODS PDF or ODS RTF
A title page, or cover page, is required for some reports. A title page often includes a logo, a report title, and a statement regarding confidentiality. The sample code on the Full Code tab demonstrates how to create a title page using these three key features in both ODS RTF and ODS PDF.
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.
Please note that the syntax in the sample code below varies slightly between the ODS PDF and the ODS RTF destinations.
options nodate nonumber;
ods escapechar="^";
title;
footnote;
/* Create a data set containing the desired title text */
data test;
text="SAS%sysfunc(byte(174))^nMy Report";
run;
/******** PDF ********/
ods pdf file="coverpage.pdf" notoc startpage=no ;
/* Insert a logo and blank lines (used to move the title text to the center of page) */
footnote1 j=c "Company Confidential";
ods pdf text='^S={preimage="C:\temp\saslogo.png"}';
ods pdf text="^20n";
/* Output the title text */
proc report data=test noheader
style(report)={rules=none frame=void}
style(column)={font_weight=bold font_size=20pt just=c};
run;
/* Output the remainder of the report */
ods pdf startpage=yes;
/* If the footnote should not persist, use a null FOOTNOTE statement */
*footnote;
proc print data=sashelp.cars(obs=45);
var make model origin cylinders;
run;
ods pdf close;
/******** RTF ********/
ods rtf file="coverpage.rtf";
/* Insert a logo and blank lines (used to move the title text to the center of page) */
title1 j=l '^S={preimage="C:\temp\saslogo.png"}';
footnote1 j=c "Company Confidential";
ods rtf text="^20n";
/* Output the title text */
proc report data=test noheader style(report)={rules=none frame=void}
style(column)={font_weight=bold font_size=20pt just=c};
run;
/* Output the remainder of the report */
title;
proc print data=sashelp.cars(obs=45);
var make model origin cylinders;
run;
ods rtf close;
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 demonstrates how to create a title page in ODS PDF or ODS RTF.
Date Modified: | 2012-05-22 14:13:05 |
Date Created: | 2012-05-14 17:14:05 |
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 | |