BookmarkSubscribeRSS Feed
msg
Calcite | Level 5 msg
Calcite | Level 5
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
5 REPLIES 5
andreas_lds
PROC Star
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
msg
Calcite | Level 5 msg
Calcite | Level 5
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
Cynthia_sas
SAS Super FREQ
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
thummala
Obsidian | Level 7

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.

Artem
Calcite | Level 5

column var1 ("(*ESC*)S={just = left}left text(*ESC*)S={}"  var2 var3 var4 var5) var6;

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 17903 views
  • 2 likes
  • 5 in conversation