Thank you, I've not posted on this forum before so I wasn't sure where to put it. I'm using SAS 9.4. Here is some code using the sashelp.class dataset that produces the "too far away" footnote version, using your style template: proc template;
define style styles.newrtf;
parent=styles.rtf;
style header / background = white font=(Times, 11pt, Bold);
replace fonts /
'TitleFont2' = ("Times",12pt,Bold Italic)
'TitleFont' = ("Times",12pt,Bold)
'StrongFont' = ("Times",11pt,Bold)
'EmphasisFont' = ("Times",11pt,Italic)
'FixedEmphasisFont' = ("Courier New, Courier",10pt,Italic)
'FixedStrongFont' = ("Courier New, Courier",10pt,Bold)
'FixedHeadingFont' = ("Courier New, Courier",10pt,Bold)
'BatchFixedFont' = ("SAS Monospace, Courier New, Courier",8pt)
'FixedFont' = ("Courier New, Courier",10pt)
'headingEmphasisFont' = ("Times",12pt,Bold Italic)
'headingFont' = ("Times",11pt,Bold)
'docFont' = ("Times",9pt);
replace Table from Output /
rules = all
cellspacing = 0.5pt
cellpadding = 2.0pt;
end;
run;
data work.class; set sashelp.class;
overall=1;
run;
ods listing close;
ods rtf file="C:\Users\jdankovchik\Desktop\sample_rtf.rtf" style=styles.newrtf bodytitle keepn startpage=no;
proc tabulate data=work.class missing; keylabel all="TOTAL";
class sex / S=[background=lightblue font_weight=bold just=left];
classlev sex overall/style=[cellwidth=4 in asis=on];
VAR OVERALL;
tables sex all, overall=''*(n*f=4.0 colpctn='(%)'*f=pctfmt.)/misstext='0' rts=15 box=[label="Testing Table 1" style=[font_size=12pt]];
keyword all / style={font_style=italic};
footnote "Testing Footnote 1";
run;
proc tabulate data=work.class missing; keylabel all="TOTAL";
class age / S=[background=lightblue font_weight=bold just=left];
classlev age overall/style=[cellwidth=4 in asis=on];
VAR OVERALL;
tables age all, overall=''*(n*f=4.0 colpctn='(%)'*f=pctfmt.)/misstext='0' rts=15 box=[label="Testing Table 2" style=[font_size=12pt]];
keyword all / style={font_style=italic};
footnote "Testing Footnote 2";
run;
ods rtf close;
ods listing; And here is the only way I figured out to adjust the distance between table and footnote, again using your style template but adding parskip and then using ODS TAGSETS.RTF. But as you see with this one, altough the footnote is now in a sensible place, only the last table gets its footnote. The rest are just missing. proc template;
define style styles.newrtf2;
parent=styles.rtf;
style header / background = white font=(Times, 11pt, Bold);
style parskip / fontsize = 6pt;
replace fonts /
'TitleFont2' = ("Times",12pt,Bold Italic)
'TitleFont' = ("Times",12pt,Bold)
'StrongFont' = ("Times",11pt,Bold)
'EmphasisFont' = ("Times",11pt,Italic)
'FixedEmphasisFont' = ("Courier New, Courier",10pt,Italic)
'FixedStrongFont' = ("Courier New, Courier",10pt,Bold)
'FixedHeadingFont' = ("Courier New, Courier",10pt,Bold)
'BatchFixedFont' = ("SAS Monospace, Courier New, Courier",8pt)
'FixedFont' = ("Courier New, Courier",10pt)
'headingEmphasisFont' = ("Times",12pt,Bold Italic)
'headingFont' = ("Times",11pt,Bold)
'docFont' = ("Times",9pt);
replace Table from Output /
rules = all
cellspacing = 0.5pt
cellpadding = 2.0pt;
end;
run;
data work.class; set sashelp.class;
overall=1;
run;
ods listing close;
ods tagsets.rtf file="C:\Users\jdankovchik\Desktop\sample_rtf.rtf" style=styles.newrtf2 startpage=no;
proc tabulate data=work.class missing; keylabel all="TOTAL";
class sex / S=[background=lightblue font_weight=bold just=left];
classlev sex overall/style=[cellwidth=4 in asis=on];
VAR OVERALL;
tables sex all, overall=''*(n*f=4.0 colpctn='(%)'*f=pctfmt.)/misstext='0' rts=15 box=[label="Testing Table 1" style=[font_size=12pt]];
keyword all / style={font_style=italic};
footnote "Testing Footnote 1";
run;
proc tabulate data=work.class missing; keylabel all="TOTAL";
class age / S=[background=lightblue font_weight=bold just=left];
classlev age overall/style=[cellwidth=4 in asis=on];
VAR OVERALL;
tables age all, overall=''*(n*f=4.0 colpctn='(%)'*f=pctfmt.)/misstext='0' rts=15 box=[label="Testing Table 2" style=[font_size=12pt]];
keyword all / style={font_style=italic};
footnote "Testing Footnote 2";
run;
ods rtf close;
ods listing; I appreciate any insight you may have! Thanks very much -Jenine
... View more