Dear Cynthia and other talented SAS users: I am trying to get the footnote text to fit under a table I created with PROC REPORT, but, ODS makes my whole table split up and span several pages. The table portion of my ideal output is supposed to look like the table that is on page one of the attached .rtf file. That table was produced by commenting out the "compute before _page_;" and "compute after;" statements at the end of the first PROC REPORT series of code. When I 'un-comment' the "compute before _page_;" and "compute after;" statements, as is the case in the 2nd PROC REPORT series of code, the title and footnote text seems to make the table on page one turn into a massive table spanning several pages. in the attached .rtf file, this 2nd table spanning several pages is found after page 1 (on pages 2-6). I will also point out that the column headings, and data values are of no importance. The goal is to get the footnote text and table title fit properly below, and above the table on page 1, respectively. Also, how can I get the table on page 1 (the ideal table) to span from left margin to right margin? For some reason, it is not filling up the page from left or right? I hope you all can help me. Thanks. proc contents data=sashelp.cars varnum; run;
proc print data=sashelp.cars (obs=10); run;
data test__
(
where=(roword<7)
)
;
length
grpord
roword
type1
brkvar
8
;
set sashelp.cars
(
drop=invoice
)
end=last;
retain grpord 1 brkvar 1;
array varc{*} $40 _character_;
array varn{*} 8 _numeric_;
array col {14} $40;
if _n_=1 then do;
type1=1;
roword+1;
col1="Variable";
do i=2 to dim(col);
col{i}=" ";
end;
output;
end;
type1=0;
roword+1;
do i = 1 to dim(varc);
col{i}=varc{i};
end;
do i=6 to dim(col);
col{i}=put(varn{i-1},10.);
end;
output;
keep
grpord
roword
type1
brkvar
col1-col14
;
rename type1=type;
run;
options nodate nonumber orientation=landscape;
title;
%let path=C:\Users\XXXX\Desktop;
ods rtf path="&path";
ods rtf file="ods_test.rtf";
ods escapechar='~';
proc report data=test__ nowd split='`';
column
grpord
roword
type
col1
("UYTEOAS"
("VV"
col2
)
("XX% UO"
col3
col4
cia
)
)
("ONIO CJIKLY"
("ZY"
col5
)
("XX% AB"
col6
col7
cio
)
)
("PJTYMNX"
("TN"
col8
)
("XX% AB"
col9
col10
cip
)
)
("LXRYNM"
("VS"
col11
)
("XX% AB"
col12
col13
cil
)
)
("~{raw \i Z}-jjjjj~{super a}"
col14
)
brkvar
;
define grpord/order noprint;
define roword/order noprint;
define type/order noprint;
define brkvar/noprint;
define col1/
display
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=l
};
define col2/
display
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col3/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col4/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define cia/
computed
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col5/
display
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col6/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col7/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define cio/
computed
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col8/
display
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col9/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col10/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define cip/
computed
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col11/
display
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col12/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col13/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define cil/
computed
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col14/
display
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
compute brkvar;
if type=0 then do;
call define('col1','style','style={leftmargin=12pt}');
end;
endcomp;
compute cia/character length=12;
if type=0 then
/*ci1=cats(col11,', ',col12);*/
cia=strip(col3)||', '||strip(col4);
else ci1=" ";
endcomp;
compute cio/character length=12;
if type=0 then
/*ci2=cats(col16,', ',col17); */
cio=strip(col6)||', '||strip(col7);
else ci2=" ";
endcomp;
compute cip/character length=12;
if type=0 then
/*ci1=cats(col11,', ',col12);*/
cip=strip(col9)||', '||strip(col10);
else ci1=" ";
endcomp;
compute cil/character length=12;
if type=0 then
/*ci2=cats(col16,', ',col17); */
cil=strip(col12)||', '||strip(col13);
else ci2=" ";
endcomp;
/*compute before _page_ /*/
/* style={just=l foreground=black font_size=10pt bordertopstyle=hidden borderrightstyle=hidden borderleftstyle=hidden};*/
/* line "Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1";*/
/*endcomp;*/
/**/
/*compute after /*/
/* style={just=l foreground=black font_size=10pt borderbottomstyle=hidden borderrightstyle=hidden borderleftstyle=hidden};*/
/* line "footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote";*/
/* line "footnote line 2 footnote line 2 footnote line 2 footnote line 2 footnote line 2 footnote line 2 footnote line";*/
/* line "footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 foo";*/
/*endcomp;*/
run;
proc report data=test__ nowd split='`';
column
grpord
roword
type
col1
("UYTEOAS"
("VV"
col2
)
("XX% UO"
col3
col4
cia
)
)
("ONIO CJIKLY"
("ZY"
col5
)
("XX% AB"
col6
col7
cio
)
)
("PJTYMNX"
("TN"
col8
)
("XX% AB"
col9
col10
cip
)
)
("LXRYNM"
("VS"
col11
)
("XX% AB"
col12
col13
cil
)
)
("~{raw \i Z}-jjjjj~{super a}"
col14
)
brkvar
;
define grpord/order noprint;
define roword/order noprint;
define type/order noprint;
define brkvar/noprint;
define col1/
display
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=l
};
define col2/
display
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col3/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col4/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define cia/
computed
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col5/
display
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col6/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col7/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define cio/
computed
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col8/
display
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col9/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col10/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define cip/
computed
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col11/
display
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col12/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col13/
noprint
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define cil/
computed
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
define col14/
display
" "
width=10
style(header)={cellwidth=0.5in}
style(column)={
just=c
};
compute brkvar;
if type=0 then do;
call define('col1','style','style={leftmargin=12pt}');
end;
endcomp;
compute cia/character length=12;
if type=0 then
/*ci1=cats(col11,', ',col12);*/
cia=strip(col3)||', '||strip(col4);
else ci1=" ";
endcomp;
compute cio/character length=12;
if type=0 then
/*ci2=cats(col16,', ',col17); */
cio=strip(col6)||', '||strip(col7);
else ci2=" ";
endcomp;
compute cip/character length=12;
if type=0 then
/*ci1=cats(col11,', ',col12);*/
cip=strip(col9)||', '||strip(col10);
else ci1=" ";
endcomp;
compute cil/character length=12;
if type=0 then
/*ci2=cats(col16,', ',col17); */
cil=strip(col12)||', '||strip(col13);
else ci2=" ";
endcomp;
compute before _page_ /
style={just=l foreground=black font_size=10pt bordertopstyle=hidden borderrightstyle=hidden borderleftstyle=hidden};
line "Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1 Title text 1";
endcomp;
compute after /
style={just=l foreground=black font_size=10pt borderbottomstyle=hidden borderrightstyle=hidden borderleftstyle=hidden};
line "footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote line 1 footnote";
line "footnote line 2 footnote line 2 footnote line 2 footnote line 2 footnote line 2 footnote line 2 footnote line";
line "footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 footnote line 3 foo";
endcomp;
run;
ods rtf close;
... View more