Help using Base SAS procedures

Alignment of column headers

Reply
Contributor msg
Contributor
Posts: 21

Alignment of column headers

This is regarding the alignment of column headers in the proc report.

Is there any option to center align column header and left align the column value?

The define statement, when given with "left" option also left aligns its column header to left.

Thanks
Super Contributor
Posts: 259

Re: Alignment of column headers

Maybe the paper "Beyond the Basics: Advanced PROC REPORT Tips and Tricks" has the answer to your question. It can be found at http://support.sas.com/rnd/papers/sgf07/sgf2007-report.pdf
Contributor msg
Contributor
Posts: 21

Re: Alignment of column headers

Thanks andreas_Ids.

But this paper doesn't contain any info/options about aligning the column header to left/center/right.

For Ex.

proc report data=sample_data nowd;
column ('Employee ID' id) ('Employee Name' name);
define id / display right;
display name / display left;
run;

This code will make, not only the column values to right & left, but also the headers..... But, i want the header to be unaffected.

Thanks
SAS Super FREQ
Posts: 8,740

Re: Alignment of column headers

Hi:
For ODS destinations that support style (NOT the LISTING destination), you can specify separate alignment:
[pre]
define name / display
style(header)={just=c}
style(column)={just=l};
[/pre]

You'd have to try this in your ODS destinations of interest. For ODS RTF, PDF and HTML, the STYLE= overrides should work. For destinations like ODS CSV and others, the alignment overrides might not work. The STYLE= overrides are will NOT work for LISTING output (what you see in the Results Window).

cynthia
Occasional Contributor
Posts: 16

Re: Alignment of column headers

Hi,

 

Is there an option that I can use to allign the column header to left in the .txt file that is generated using proc report.

 

for example:

 

proc report data=abc  options;

column var1 ("left text"  var2 var3 var4 var5) var6;

[/pre]

 

I want the output to look like

 

                  left text________________

var1           var2     var3     var4    var5      var6

 

 

 

Thank You.

Ask a Question
Discussion stats
  • 4 replies
  • 1000 views
  • 0 likes
  • 4 in conversation