BookmarkSubscribeRSS Feed
SASPhile
Quartz | Level 8
I used the following code in proc report:
define zip/group '5 digit zip'
STYLE (header) = {just=left font_size=1}
STYLE (COLUMN) = {htmlstyle="mso-number-format:\@" just=left font_size=1.5};

And it generates this error:
ERROR: The width of ZIP is not between 1 and 96. Adjust the column width or linesize.
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
And what error do you get when you code a WIDTH= parameter? Also, you may want to share the entire PROC REPORT invocation code, as it appears in the SAS log window/output for more accurate review and response.


Scott Barry
SBBWorks, Inc.

PROC REPORT DOC - DEFINE Statement, WIDTH= parameter:

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002473627.htm#a003072093
Cynthia_sas
Diamond | Level 26
Hi:
The WIDTH= option in PROC REPORT is ignored by ODS destinations, such as ODS HTML, ODS CSV and ODS TAGSETS.EXCELXP. Depending on what else you're doing, this error message sometimes results because the LISTING destination is still open and has determined that the width of your PROC REPORT report rows are greater than the current LISTING destination LINESIZE option.

So, as explained in this Tech Support note:
http://support.sas.com/kb/18/518.html

...your solution is usually to close the LISTING destination. Of course, you might also want LISTING -and- HTML output, in which case, you could:
1) increase the LINESIZE on the options statement
2) increase the LINESIZE on the PROC REPORT statement
3) double check WIDTH= on your DEFINE statements
but remember that these 3 "tweaks" will work for LISTING only and are irrelevant to HTML files created with ODS.

Since, from your HTMLSTYLE override, I see that you are using the mso-number-format, it seems to me that you must be creating an HTML file to open with Excel. In this case, simply closing the LISTING destination should get rid of the error message.

cynthia

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1017 views
  • 0 likes
  • 3 in conversation