Features: |
DEFINE FOOTER statement: : TEXT statement |
Other features: |
|
Data set: | Grain_Production |
Format: | $CNTRY. |
proc template; define style newstyle2; style fonts / "cellfont"=("arial, helvetica", 4, medium roman) "headingfont"=("arial, helvetica", 5, bold roman) "titlefont"=("arial, helvetica", 6, bold italic);
style colors / "light"=white "medium"=cxaaaaff "dark"=cx0000ff "bright"=red;
style cellcontents / backgroundcolor=colors("dark") color=colors("light") font=fonts("cellfont"); style header / backgroundcolor=colors("medium") color=colors("dark") font=fonts("headingfont"); style systemtitle / backgroundcolor=colors("light") color=colors("bright") font=fonts("titlefont"); 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 body="newstyle2-body.htm" style=newstyle2;
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 newstyle2; style fonts / "cellfont"=("arial, helvetica", 4, medium roman) "headingfont"=("arial, helvetica", 5, bold roman) "titlefont"=("arial, helvetica", 6, bold italic);
style cellcontents / backgroundcolor=colors("dark") color=colors("light") font=fonts("cellfont"); style header / backgroundcolor=colors("medium") color=colors("dark") font=fonts("headingfont"); style systemtitle / backgroundcolor=colors("light") color=colors("bright") font=fonts("titlefont"); style footer from systemtitle / fontsize=3; style table / borderspacing=5 borderwidth=10;
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")) ) );
style colors / "light"=white "medium"=cxaaaaff "dark"=cx0000ff "bright"=red;
style colors / "light"=white "medium"=pink "dark"=red "bright"=red;
"cellfont"=("arial, helvetica", 4, medium roman)
"cellfont"=("courier, arial, helvetica", 4, medium roman)
style colors / "light"=white "medium"=cxaaaaff "dark"=cx0000ff "bright"=red;