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
SAS Super FREQ
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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 595 views
  • 0 likes
  • 3 in conversation