Wednesday, November 9, 2016

options printerpath =

I was doing a relatively simple ODS PDF proc report using options = landscape; and using ^{thispage} of ^{lastpage}. Here is a snippet of the original code:

ods listing close ;
options orientation = landscape nodate nonumber ;

ods escapechar = '^' ;
ods pdf file = "c:\temp\x.pdf" notoc  ;
title f = arial "My Title" ;
footnote color = black h = 7pt 
  j = l 'Page ^{thispage} of ^{lastpage}'
  j = r "Produced: %sysfunc(date(), mmddyy10.)" ;

proc report data = report nowd 
  style( report header column ) = [ font_size = 8pt fontfamily = arial ]
  style( column ) = [ cellheight = .18in ] ;

  columns ....

I was told that "there are certain situations where SAS changes the default values for the system options LINESIZE and PAGESIZE and then persists these changes from one SAS session to the next. If SAS sets the LINESIZE and PAGESIZE values too small, the following will show up in the log:"

ERROR: Current settings for paper size, orientation and margins
       imply that the printable area has zero size.  Change one
       or more of those settings and try again.
ERROR: Internal error trying to set up "page i of n"
       processing.  Could be caused by out of memory, out of
       disk space, or internal coding error. Check for other
       error messages above indicating probable user error or
       resource constraints; if there are none, or if they make
       no sense, please report this message and provide a test
       program to SAS Institute. Output will continue without
       PAGEOF support.

Martin from SAS technical support suggested I try this usage note: or in the alternative SAS Research and Development suggested I add the following line to my code which worked like a charm.

options printerpath=PDF; 

No comments:

Post a Comment