The SAS Output Delivery System and reporting techniques

An empty page is getting diaplyed at the end of the file

Reply
N/A
Posts: 0

An empty page is getting diaplyed at the end of the file

I am running the following syntax for proc report and ods output, but at the end of the file an empty page with footnote and header is getting diplayed without the data table. I tried using 'STARTPAGE NO' option, but still the empty page is getting displayed. I dont want the empty page to be displayed. Any suggestions?





ods escapechar='^';
options orientation=landscape ;
options nonumber NODATE;
options orientation=landscape ;
ods listing close;

ODS RTF BODY ='U:\0701 Protocol\XXXX\SAS_PRGM_XXX\Tables_XXX\t16_XXXX.rtf' ;

proc report NOWD CENTER MISSING spanrows out=z
style(column)={font_face= "Times New Roman" font_size=9pt asis=on background=_undef_ font_weight= medium cellheight=.15in}
style(report)={cellheight=.2in cellpadding=0pt rules=group frame=void background=_undef_}
style(header)={BOTTOMMARGIN = 0IN cellheight=.15in font_face= "Times New Roman" font_size=9pt background=_undef_ font_weight= medium}
data =final
ps=80 ls=160
split = "|"
nowindows;
columns PAGEIT cohort VISIT TIMEPOINT p cat ('^R/RTF"\brdrb\brdrs\brdrw1" Placebo (N=n)|' plac chgp) EMPTY ('^R/RTF"\brdrb\brdrs\brdrw1" BB-609(N=n)|' BB609 chgs) PVALUE2 ;
define pAGEIT/ORDER noprint;
define COHORT /order style(column)=[cellwidth=5% ]center width = 8 "Cohort" ;
define p/ORDER noprint;
define VISiT /ORDER noprint;
define TIMEPOINT /ORDER style(column)=[cellwidth=10% ] CENTER width = 25 "Time Point" ;
define cat/display style(column)=[cellwidth=20% just=left ]left width = 25 "Category (Range) ";
define plac/display style(column)=[cellwidth=7% just=C ]center width = 25 "Result ";
define chgp/DISPLAY style(column)=[cellwidth=7% just=C ]center width = 25 "Change [1] ";
define sb509/display style(column)=[cellwidth=8% just=C ]center width = 25 "Result ";
define chgs/DISPLAY style(column)=[cellwidth=7% just=C ]center width = 25 "Change [1] ";
define pvalue2/ORDER style(column)=[cellwidth=7% just=C ]center width = 25 "P-value(2) ";
define empty /computed ' ' style(column)=[cellwidth=2% just=C ];
/*BREAK BEFORE PAGEIT/SKIP;*/
/*BREAK AFTER P/SKIP;*/


compute empty /character length=20;
empty = "";
endcomp;


compute BEFORE p;
line ' ';
endcomp;

/*compute BEFORE PAGEIT;*/
/*line ' ';*/
/*endcomp;*/



title1 j=r h=0.75 f="Times New Roman/bold " "Page ^{thispage} of ^{lastpage}" j=l f="Times New Roman " h=1.75"XXXXXXX";
Title2 j=left f="Times New Roman/bold " h=1 "XXXXXXXX";
title3 j=c H=1.75 f="Times New Roman/bold " "Table 16 ";
title4 j=c H=1.75 f="Times New Roman/bold " "NISLL ";
title5 j=c H=1.75 f="Times New Roman/bold " "Intent-To-Treat Population";

footnote1 j=left H=1.75 f="Times New Roman " " For the time points LOCF-Day 180 and LOCF-Day 360, missing values due to dropout
are imputed using last observation carried forward.";
footnote2 j=left H=1.75 f="Times New Roman " " [1] Change from baseline. Baseline is defined as the last value recorded prior to the first dose of study drug.";
footnote3 j=left H=1.75 f="Times New Roman " " [2] From the Wilcoxon rank sum test comparing change from baseline between Placebo and XXXXXX";
footnote4 j=left H=1.75 f="Times New Roman " %sysget(SAS_EXECFILEPATH) &sysuserid %sysfunc(datetime(),datetime.);
/*proc print blankline=5;*/
run;
ODS RTF CLOSE; Message was edited by: Lucy
SAS Super FREQ
Posts: 8,743

Re: An empty page is getting diaplyed at the end of the file

Hi:
You may be running into this issue:
http://support.sas.com/kb/16/976.html

As it says in the note:

When using ODS to create RTF files, SAS creates one or more tables in RTF, then hands those tables off to MS Word to paginate. In some cases, a table is just close enough to the bottom margin that MS Word thinks there is more information for that table to continue on the next page, and generates a blank page at the end of the document, with titles and footnotes populated.

There is not anything SAS can do to guarantee that MS Word will not think there is just enough information to build a new page.


If you have a few more or a few less rows in the table, then I suspect you would not observe this behavior anymore. The suggested fix is to change the margins. You might also try the TAGSETS.RTF destination (new in SAS 9.2) to see whether the pagination problems still persist with the new RTF destination.

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