Problem Note 8044: The TEXT= option in the ODS PRINTER/RTF statement is always left justified
The TEXT= option allows the addition of text between procedures in non-Listing ODS destinations. Since only one set of titles and footnotes are written out to a file when the STARTPAGE option is set to NO or OFF in the PDF and RTF destinations, this option is extremely useful for describing table information. By default, the text is left justified in the PDF and RTF files.
The code on the Full Code tab shows how to control this text with inline style commands or PROC TEMPLATE.
Operating System and Release Information
SAS System | Base SAS | Microsoft Windows 95/98 | 8.2 TS2M0 | |
Microsoft Windows NT Workstation | 8.2 TS2M0 | 9 TS M0 |
Microsoft Windows XP Professional | 8.2 TS2M0 | 9 TS M0 |
Windows Millennium Edition (Me) | 8.2 TS2M0 | |
Microsoft Windows 2000 Datacenter Server | 8.2 TS2M0 | 9 TS M0 |
Microsoft Windows 2000 Professional | 8.2 TS2M0 | 9 TS M0 |
Microsoft Windows 2000 Server | 8.2 TS2M0 | 9 TS M0 |
Microsoft Windows 2000 Advanced Server | 8.2 TS2M0 | 9 TS M0 |
OpenVMS VAX | 8.2 TS2M0 | |
64-bit Enabled Solaris | 8.2 TS2M0 | |
Solaris | 8.2 TS2M0 | |
IRIX | 8.2 TS2M0 | |
OS/2 | 8.2 TS2M0 | |
z/OS | 8.2 TS2M0 | 9 TS M0 |
Linux | 8.2 TS2M0 | 9 TS M0 |
CMS | 8.2 TS2M0 | |
ABI+ for Intel Architecture | 8.2 TS2M0 | |
64-bit Enabled HP-UX | 8.2 TS2M0 | |
OpenVMS Alpha | 8.2 TS2M0 | 9 TS M0 |
64-bit Enabled AIX | 8.2 TS2M0 | 9 TS M0 |
Tru64 UNIX | 8.2 TS2M0 | 9 TS M0 |
AIX | 8.2 TS2M0 | 9 TS M0 |
HP-UX | 8.2 TS2M0 | |
*
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 shows how to use PROC TEMPLATE and inline style commands to center the text written by the ODS
destination TEXT= option.
/* The following inline style command will center the
text placed on the ODS PDF TEXT= statement: */
ods escapechar='^';
ods pdf file='file.pdf' startpage=no;
proc print data=sashelp.class(obs=1);
run;
ods pdf text="^S={just=c} This is my interim title";
proc print data=sashelp.class(obs=1);
run;
ods pdf close;
/* An OUTPUTWIDTH specification is necessary for similar logic to work in the RTF destination. */
ods rtf text="^S={outputwidth=100% just=c} My Text";
/* The following PROC TEMPLATE code will also provide formatting control */
proc template;
define style mystyle ;
parent=styles.printer;
style UserText from Note / just=c;
end;
run;
ods rtf file="file.rtf" startpage=no style=mystyle;
proc print data=sashelp.class (obs=1);
run;
ods rtf text="My Text";
proc print data=sashelp.class (obs=1);
run;
ods rtf close;
Type: | Problem Note |
Priority: | medium |
Topic: | SAS Reference ==> ODS (Output Delivery System)
|
Date Modified: | 2009-02-05 09:47:45 |
Date Created: | 2002-07-17 17:28:57 |