Hello
What is the different in proc report between width statement and cellwidth statement?
Are both adjust column width?
'width' is obsolete, it is just suited for LISTING destination . use 'cellwidth' just fine.
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
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.