SAS OnlineTutor HomeFAQ PageSuggested Learning PathContents+Searchback||next

Creating Enhanced List and Summary Reports
Specifying Column Justification


You might also want to specify justification for columns in your report. Remember that by default, PROC REPORT left-justifies character variables and right-justifies numeric variables. For each variable that you define, you can specify the justification option CENTER, LEFT, or RIGHT in the DEFINE statement.

Each option justifies both the formatted values of the report item within the column width and the column headings over the values.


Example

To center headings and values for Flight, Orig, and Dest, you can specify the CENTER option as shown below in your DEFINE statements:


proc report data=flights.europe nowd; where dest in ('LON','PAR'); column flight orig dest mail freight revenue; define revenue / format=dollar15.2; define flight / width=6 'Flight/Number' center; define orig / width=6 spacing=5 'Flight/Origin' center; define dest / width=11 spacing=5 'Flight/Destination' center; run;

Partial PROC REPORT Output, SAS Listing
 Flight
 Number
     Flight
     Origin
     Flight
     Destination
Mail Freight Revenue 
 821      LGA      LON         403         209   $150,634.00 
 271      LGA      PAR         492         308   $156,804.00 
 271      LGA      PAR         366         498   $190,098.00 
 821      LGA      LON         345         243   $150,634.00 
 821      LGA      LON         248         307   $193,930.00 


back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement