Enhancing Reports | |
Lesson
Summary![]() ![]() |
![]() |
This page contains
|
I. Text Summary
To go to the page where a task, programming feature, or concept was presented, select a link. |
Specifying Titles To make your report more meaningful and self-explanatory, you can associate up to ten titles with procedure output by using TITLE statements anywhere within or preceding the PROC step. After you define a title, it remains in effect until you modify it, cancel it, or end your SAS session. Redefining a title line cancels any higher-numbered title lines. To cancel all previous titles, specify a null TITLE statement (a TITLE statement with no number or text). |
Using the TITLES Window You can also specify titles in the TITLES window. These titles are not stored with your program, and they remain in effect only during your SAS session. |
Specifying Footnotes To add footnotes to your output, you can use the FOOTNOTE statement. Like TITLE statements, FOOTNOTE statements are global. Footnotes appear at the bottom of each page of procedure output, and footnote lines are "pushed up" from the bottom. The FOOTNOTE statement with the largest number appears on the bottom line. After you define a footnote, it remains in effect until you modify it, cancel it, or end your SAS session. Redefining a footnote line cancels any higher-numbered footnote lines. To cancel all previous footnotes, specify a null FOOTNOTE statement (a FOOTNOTE statement with no number or text). |
Using the FOOTNOTES Window You can also specify footnotes in the FOOTNOTES window. These footnotes are not stored with your program, and they remain in effect only during your SAS session. |
Assigning Descriptive Labels To label the columns in your report with more descriptive text, you use the LABEL statement, which assigns a descriptive label to a variable. To display labels specified in a LABEL statement used with PROC PRINT, you must specify the LABEL option in the PROC PRINT statement. |
Formatting Data Values To make data values more understandable when they are displayed in your procedure output, you can use the FORMAT statement, which associates formats with variables. The FORMAT statement remains in effect only for the PROC step in which it appears. Formats affect only the way that the data values appear in output, not the actual data values as they are stored in the SAS data set. All SAS formats specify the total field width (w) used for displaying the values in the output. For numeric variables you can also specify the number of decimal places (d), if any, to be displayed in the output.
|
II. Syntax
To go to the page where a statement or option was presented, select a link. |
LIBNAME libref 'SAS-data-library'; |
OPTIONS options; |
TITLE<n> 'title-text'; |
FOOTNOTE<n> 'footnote-text'; |
PROC PRINT
DATA=SAS-data-set LABEL; (or any SAS procedure that produces output) |
LABEL variable-1='label-1 . . . ' variable-n='label-n'; |
FORMAT variable(s) format-name; |
RUN; |
|
III. Sample Program
libname clinic 'c:\stress\labdata'; options nodate number pageno=15; title1 'Admissions for Low Activity Patients'; footnote2 'March 2002 Summary'; proc print data=clinic.admit label; var id name fee; where actlevel='LOW'; label fee='Admission Fee'; format fee dollar8.2; run; |
IV. Points to Remember
|
![]() ![]() ![]() ![]() ![]() |
|
![]() |
![]() |
Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.