BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

Hello

What is the different in proc report between  width statement  and cellwidth statement?

Are both adjust column width?

 

 

 

 

 

 

3 REPLIES 3
Ksharp
Super User

'width' is obsolete, it is just suited for LISTING destination . use 'cellwidth' just fine.

Cynthia_sas
Diamond | Level 26

Hi: To clarify the use of WIDTH -- There are actually 2 ways to specify WIDTH in PROC REPORT. LISTING destination uses the WIDTH option, not in any special syntax:
define varname / display 'label' width=6;

or you can use a style override for other ODS destinations in which WIDTH and CELLWIDTH are aliases:
define varname / display 'label'
style(column)={width=1.5in color=red};
or
define varname /display 'label'
style(column)={cellwidth=1.5in color=red};

In the simple LISTING example, WIDTH is the number of characters wide the column needs to be when displayed in a fixed pitch font. In the STYLE override examples, WIDTH= or CELLWIDTH= can be used interchangeably and you specify a number, followed by a unit of measure, pixels, inches, cm or percent.

Cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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