The SAS Output Delivery System and reporting techniques

How print certain number of records in a pdf file.

Reply
Frequent Contributor
Frequent Contributor
Posts: 81

How print certain number of records in a pdf file.

Hi Dear,
I am trying create a pdf file from the mainfram(SAS 8.2) and I am successfull to create a pdf file too, but I trying to print only 35 records per sheet(one letter size paper)
when I put following codes, it print 35 records per page and it print 2 or more pages in a sheet, but I want to print only 35 records per sheet. How do I do that.

Thanks for your help in advance.

regards

Inp

OPTIONS ORIENTATION=LANDSCAPE;
OPTIONS PAPERSIZE=LEGAL;
OPTIONS LS=132 PS=35;
OPTIONS NODATE NONUMBER ;
OPTIONS ORIENTATION=LANDSCAPE PAPERSIZE=LETTER;
OPTIONS TOPMARGIN = '1IN'
BOTTOMMARGIN='1IN'
LEFTMARGIN='0.5IN'
RIGHTMARGIN='0.5IN';
TITLE ;
ODS PDF FILE=PRT NOTOC STYLE=NORMALPRINTER;
DATA _NULL_;
SET ALLDATA END=EOF;
FILE PRINT HEADER=H NOTITLES LL=LNSLEFT;
SAS Super FREQ
Posts: 8,866

Re: How print certain number of records in a pdf file.

Hi:
Options LS and PS are essentially ignored for ODS destinations. They are LISTING destination or LISTING window options. So, for ODS PDF (and RTF and HTML) the concept of FILE PRINT is not one that works for ODS in the same way that worked for LISTING window output.

There is no concept of "LINESLEFT" anywhere but the LISTING window and you may find that PUT _PAGE_ does not work with ODS PDF (or RTF or HTML) the way you expect.

Your PAPERSIZE options and ORIENTATION would have an impact on PDF, as would the MARGIN options. Since you ask for both PAPERSIZE=LEGAL, followed by PAPERSIZE=LETTER, it is the last setting that "wins".

The LISTING destination and FILE PRINT, give you a way to address the whole output area as though it were a piece of graph paper. However, techniques (such as LINESLEFT, PUT @15, PUT @32, etc) that work with the LISTING destination do not work with ODS or if they do work, will generally produce undesirable results.

These Tech Support Notes may cast some light on the issues involved.
http://support.sas.com/kb/14/766.html
http://support.sas.com/kb/5/486.html
http://support.sas.com/kb/24/256.html
http://support.sas.com/kb/24/606.html
http://support.sas.com/kb/25/414.html
http://support.sas.com/kb/23/661.html

If your report is basically tabular in structure, you may want to use other techniques to force only 35 observations/records per sheet (such as PROC PRINT or PROC REPORT or FILE PRINT ODS and PUT _ODS_). I don't know what you mean by "when I put following codes, it print 35 records per page and it print 2 or more pages in a sheet" however, that sounds like undesirable results to me. You may want to work with Tech Support on this issue.

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 127 views
  • 0 likes
  • 2 in conversation