Features: |
DEFINE STYLE statement : REPLACE statement DEFINE TABLE statement: CELLSTYLE AS statement DEFINE COLUMN statement: DEFINE HEADER statement: TEXT statement DEFINE HEADER statement: TEXT statement |
Other features: |
|
Data set: | Exprev |
options obs=20; title;
proc template; define style greenbar;
parent=styles.printer;
replace headersandfooters from cell / backgroundcolor=light green color=black fontsize=3 fontweight=bold ;
end; run;
ods html body="greenbar.html" style=greenbar; ods pdf file="greenbar.pdf" style=greenbar;
ods trace on;
proc template; define table Checkerboard;
cellstyle mod(_row_,2) && mod(_col_,2) as data{backgroundcolor=yellow fontweight=bold }, not(mod(_row_,2)) && not(mod(_col_,2)) as data{backgroundcolor=yellow fontweight=bold }, 1 as data;
define header top; text "Checkerboard Table Template"; end;
define column country; dataname=country; define header bar; text "Country"; end; header=bar; end;
define column OrderDate; dataname=Order_Date; define header bar; text "Order Date"; end; header=bar; end;
define column ShipDate; dataname=Ship_Date; define header bar; text "Ship Date"; end; header=bar; end;
define column SaleType; dataname=Sale_Type; define header bar; text "Sale Type"; end; header=bar; end;
end; run;
data _null_; set work.exprev;
file print ods=(template="Checkerboard"); put _ods_; run;
ods html close; ods pdf close; ods html;
replace headersandfooters from cell / backgroundcolor=light green color=black fontsize=3 fontweight=bold ;
cellstyle mod(_row_,2) && mod(_col_,2) as data{backgroundcolor=yellow fontweight=bold }, not(mod(_row_,2)) && not(mod(_col_,2)) as data{backgroundcolor=yellow fontweight=bold }, 1 as data;
define column OrderDate; dataname=Order_Date; define header bar; text "Order Date"; end; header=bar; end;
define column ShipDate; dataname=Ship_Date; define header bar; text "Ship Date"; end; header=bar; end;
define column SaleType; dataname=Sale_Type; define header bar; text "Sale Type"; end; header=bar; end;