TEMPLATE Procedure: Creating Tabular Output |
PROC TEMPLATE features: |
Border control style attributes:
|
BORDERBOTTOMCOLOR= |
|
BORDERBOTTOMSTYLE= |
|
BORDERBOTTOMWIDTH= |
|
BORDERTOPCOLOR= |
|
BORDERTOPSTYLE= |
|
BORDERTOPWIDTH= | |
DEFINE
statement |
DEFINE STYLE statement |
EDIT statement |
FOOTER statement |
HEADER
statement |
PARENT= statement |
PREFORMATTED= header attribute |
STYLE statement |
WIDTH= header
attribute |
|
Other ODS features: |
|
Data set: |
See Creating the Nlits Data Set.
|
You can use the TableHeaderContainer and TableFooterContainer style
elements along with the border control style attributes to change the borders
of the regions surrounding the table header and footer.
Note: The TableHeaderContainer
and TableFooterContainer style elements are only valid in the RTF destination.
|
options nodate nonumber;
ods listing close;
title "TableHeaderContainer, TableFooterContainer, and Border Control Style
Attributes";
title2 "Allows Control of Borders Between the Header, Body, and Footer of a
Table";
|
|
proc template;
define style HeadersFootersBorders;
parent=styles.rtf; |
|
style TableHeaderContainer from TableHeaderContainer /
borderbottomwidth=12
borderbottomcolor=blue
borderbottomstyle=dotted; |
|
style TableFooterContainer from TableFooterContainer /
bordertopwidth=6
bordertopcolor=red
bordertopstyle=double; |
|
style table from table /
cellspacing=0 rules=groups frame=void;
end;
run; |
|
proc template;
edit Base.Datasets.Members;
header hd1;
footer ft1;
define hd1;
preformatted=on;
just=l;
text" Table Header with Leading and Trailing Blanks ";
end;
define ft1;
preformatted=on;
just=l;
text" Table Footer with Leading and Trailing Blanks ";
end;
edit name;
define header myheader;
just=l;
preformatted=on;
text " My new header";
end;
header=myheader;
width=memname_width width_max=memname_width_max;
preformatted=on;
end;
end;
run;
|
|
ods rtf file="headerfooters.rtf" style=HeadersFootersBorders;
ods select members;
proc datasets lib=nlits;
run;
quit; |
|
ods _all_ close;
ods listing; |
RTF Output with Custom Headers and Footers
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.