DATA Step, Macro, Functions and more

Proc report

Super Contributor
Posts: 648

Proc report

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.
Super Contributor
Super Contributor
Posts: 3,174

Re: Proc report

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:
Posts: 8,744

Re: Proc report

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:

...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.

Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation