DATA Step, Macro, Functions and more

Proc report

Reply
Super Contributor
Posts: 673

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:

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002473627.htm#a003072093
SAS Super FREQ
Posts: 8,868

Re: Proc report

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
Ask a Question
Discussion stats
  • 2 replies
  • 112 views
  • 0 likes
  • 3 in conversation