SAS OnlineTutor HomeFAQ PageSuggested Learning PathContents+Searchback||next

Creating Enhanced List and Summary Reports
Defining Column Attributes


Specifying Column Spacing

Another way to enhance your PROC REPORT output is to specify column spacing, which is the number of blank characters between the selected column and the column immediately to its left. The default column spacing is 2. To specify a different column spacing, use the SPACING= attribute in the DEFINE statement.

The SPACING= attribute has no effect on HTML output.


Example

This is PROC REPORT output without any spacing defined. Orig and Dest have 2 blank characters preceding their columns.


Partial PROC REPORT Output, SAS Listing
 Flight   Orig   Dest 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 

To specify 5 blank spaces before the column headings for Orig and Dest, you can use DEFINE statements as shown below in your PROC REPORT step:


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; define orig / width=4 spacing=5; define dest / width=4 spacing=5; run;
Now the two columns display the extra spacing.

Partial PROC REPORT Output, SAS Listing
 Flight      Orig      Dest 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