Features: |
BACKGROUNDCOLOR= in the STYLE statement BORDERWIDTH= in the STYLE statement BORDERSPACING= in the STYLE statement FONTFAMILY= in the STYLE statement FONTSIZE= in the STYLE statement FONTSTYLE= in the STYLE statement FONTWEIGHT= in the STYLE statement COLOR= in the STYLE statement CLASSLEVELS= table attribute in the DEFINE TABLE statement DYNAMIC statement in the DEFINE TABLE statement MVAR statement in the DEFINE TABLE statement BLANK_DUPS= in the DEFINE COLUMN statement GENERIC= in the DEFINE COLUMN statement HEADER= in the DEFINE COLUMN statement STYLE= in the DEFINE COLUMN statement TEXT statement in the DEFINE FOOTER statement |
Other features: |
|
Data set: | Grain_Production |
Format: | $CNTRY. |
proc template; define style newstyle; style cellcontents / fontfamily="arial, helvetica" fontweight=medium backgroundcolor=blue fontstyle=roman fontsize=5 color=white;
style header /
backgroundcolor=very light blue
fontfamily="arial, helvetica"
fontweight=medium
fontstyle=roman
fontsize=5
color=white;
style systemtitle / fontfamily="arial, helvetica" fontweight=medium backgroundcolor=white fontstyle=italic fontsize=6 color=red;
style footer from systemtitle / fontsize=3;
style table / borderspacing=5 borderwidth=10;
end; run;
proc template; define table table1;
mvar sysdate9;
dynamic colhd;
classlevels=on;
define column char_var; generic=on; blank_dups=on; header=colhd; style=cellcontents; end;
define column num_var; generic=on; header=colhd; style=cellcontents; end;
define footer table_footer; text "Prepared on " sysdate9; end;
end; run;
ods html file="newstyle-body.htm" style=newstyle;
title "Leading Grain Producers"; title2 "in 1996";
data _null_; set grain_production; where type in ("Rice", "Corn") and year=1996;
file print ods=( template="table1"
columns=( char_var=country(generic=on format=$cntry. dynamic=(colhd="Country")) char_var=type(generic dynamic=(colhd="Year")) num_var=kilotons(generic=on format=comma12. dynamic=(colhd="Kilotons")) ) );
put _ods_; run;
ods html close; ods html;
proc template; define style newstyle; style cellcontents / fontfamily="arial, helvetica" fontweight=medium backgroundcolor=blue fontstyle=roman fontsize=5 color=white;
style header /
backgroundcolor=very light blue
fontfamily="arial, helvetica"
fontweight=medium
fontstyle=roman
fontsize=5
color=white;
style systemtitle / fontfamily="arial, helvetica" fontweight=medium backgroundcolor=white fontstyle=italic fontsize=6 color=red;
file print ods=( template="table1"
columns=( char_var=country(generic=on format=$cntry. dynamic=(colhd="Country")) char_var=type(generic dynamic=(colhd="Year")) num_var=kilotons(generic=on format=comma12. dynamic=(colhd="Kilotons")) ) );