BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sarah-R
Obsidian | Level 7

What Proc Report code do I need to be able to center vertically align text, changing it from top to center alignment?  Right now, in Proc Report, the default vertical alignment is top. 

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
ed_sas_member
Meteorite | Level 14

Hi @Sarah-R 

 

You can use a style option in the PROC REPORT statement:

 

proc report data=/*your data*/ style(/*location*/)={verticalalign=middle};

.. where 'location' could be header, column, data, ...

 

For example, if you want to align columns headers, you can put : style(header)={verticalalign=middle}

 

Best,

View solution in original post

4 REPLIES 4
ed_sas_member
Meteorite | Level 14

Hi @Sarah-R 

 

You can use a style option in the PROC REPORT statement:

 

proc report data=/*your data*/ style(/*location*/)={verticalalign=middle};

.. where 'location' could be header, column, data, ...

 

For example, if you want to align columns headers, you can put : style(header)={verticalalign=middle}

 

Best,

Ksharp
Super User
Try:

style={ vjust=m } ;
style={ vjust=c } ;
Sarah-R
Obsidian | Level 7

Both these methods work. 

Thank you @ed_sas_member!

Thank you @Ksharp!

Sarah-R
Obsidian | Level 7

An alternative is height=.22in.

For example: style(column)={height=.22in}

or larger if the vertical alignment is not working, particularly in ods output.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 4 replies
  • 9553 views
  • 3 likes
  • 3 in conversation