BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I am using proc report for my rtf output and the style is printer.
Somehow the output is printed on legal paper instead of letter and I am unable to identify the problem which causes it to do so.
I am adding the code that I use.
Can anyone please help me figure out what parameter is setting it to print on a legal paper.

The code is :


data _null_;
EXEDATE=DATE();
CALL SYMPUT('EXEDATE',PUT(datetime(),datetime15.));
RUN;

options orientation=portrait symbolgen mgen mprint mergenoby=warn msglevel=i replace;
options nonumber nodate missing=' '
bottommargin = "1.in"
topmargin = "1.in"
rightmargin = "1.in"
leftmargin = "1.in";

ods escapechar="^";

ods listing close;

ods rtf file="PATH.rtf" style=printer;
proc report data=(analysis dataset name) nowindows split='*' headline headskip wrap
style(report)=[ just=center ]
style(column) = [asis=on font_size=10pt ]
style(header)=[background=white font_size=11pt vjust=center ] ;

column pgord sequence sequence2 VariableDesc G1Desc G2Desc TotalDesc ;

define pgord / order order=internal noprint ;
define sequence / order order=internal noprint ;
define sequence2 / order order=internal noprint ;
define VariableDesc / display width=60 flow left "TEXT" style(column) = [CELLWIDTH=180pt frame=box];
define G1Desc / display width=26 center "TEXT" style(column) = CELLWIDTH=92pt frame=box];
define G2Desc / display width=26 center "TEXT" style(column) = [CELLWIDTH=92pt frame=box];
define TotalDesc / display width=26 center "TEXT" style(column) = [CELLWIDTH=92pt frame=box];

break after pgord/ PAGE;

title1 j=l height=10pt font = times BOLD "TEXT" j=r BOLD "Page ^{pageof}";
title2 j=l height=10pt font = times BOLD " " j=r BOLD "Draft : &Draft";
title3 " " ;
title4 j=c height=11pt font = times BOLD "&title1txt" ;


footnote1 j=l height=8pt font = times
"Program: PATH" j=r "Created on:&EXEDATE";

footnote2 j=r height=8pt font = times "TEXT" j=r font=times;

run;

ods rtf text="^S={font=(""times"",8pt)} ^{super 1}&footnt1";
ods rtf text="^S={font=(""times"",8pt)} ^{super 2}&footnt2";
ods rtf text="^S={font=(""times"",8pt)} &footnt3";
ods rtf text="^S={font=(""times"",8pt)} &footnt4";
ods rtf text="^S={font=(""times"",8pt)} ^{super 3}&footnt5";
ods rtf text="^S={font=(""times"",8pt)} &footnt6";
ods rtf text="^S={font=(""times"",8pt)} &footnt7";
ods rtf text="^S={font=(""times"",8pt)} ^{super 4}&footnt8";
ods rtf text="^S={font=(""times"",8pt)} ^{super 5}&footnt9";
ods rtf text="^S={font=(""times"",8pt)} ^{super 6}&footnt10";

ods rtf close;
ods listing;

Thank you very much for your time.

Regards,
April.
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
Offhand, I'm not sure what's going on. First, there are a few irrelevant things you could take OUT of your code, FLOW, WRAP, HEADLINE, HEADSKIP, WIDTH are LISTING only options with PROC REPORT. They are ignored by ODS destinations such as HTML, RTF and PDF. See this Tech Support note for more information:
http://support.sas.com/kb/2/549.html

WRAP and FLOW aren't listed in this note, but they are also ignored based on these notes in the doc:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002473627.htm#a003072097 (FLOW is "monospace" or LISTING only)
and
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002473620.htm#a003071991 (WRAP is "monospace" or LISTING only)

Also, you have FRAME=BOX on multiple DEFINE statements -- I'm surprised you didn't get an error message, but it was probably just ignored. FRAME= is a TABLE level style attribute, not a CELL level style attribute. (as described in the doc: http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002972093.htm#a002978399)

Your CELLWIDTHS seems a bit odd to me. Although you can specify PT for cellwidth, usually, I've always seen cellwidth specified as either IN or CM or EM.

But I seriously doubt whether any of those things had an impact on the papersize being set to legal.

I wonder whether you've somehow issued a PAPERSIZE=LEGAL option elsewhere in your session as an option?? You could try adding PAPERSIZE=LETTER to your OPTIONS statement.
[pre]
options nonumber nodate missing=' '
bottommargin = "1.in"
topmargin = "1.in"
rightmargin = "1.in"
leftmargin = "1.in" papersize=letter;

[/pre]

If the PAPERSIZE option doesn't fix your issue, you might consider opening a track with Tech Support.

cynthia
Doc_Duke
Rhodochrosite | Level 12
You can also see the current value of PAPERSIZE via PROC OPTIONS;
deleted_user
Not applicable
Thanks a lot for your help.

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!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

Discussion stats
  • 3 replies
  • 3250 views
  • 0 likes
  • 3 in conversation