I am having a problem with a style option (background=lightyellow) failing to show up in the second table of my HTML output. Please see the code below.
ods tagsets.tableeditor file="&path\&&xst1.SASHELP..html"
options(
frozen_headers="yes"
frozen_rowheaders="yes"
banner_color_even="beige"
banner_color_odd="white"
header_bgcolor="teal"
header_fgcolor="white"
rowheader_bgcolor="lightblue"
gridline_color="gray"
header_size="12"
rowheader_size="12"
data_size="11"
);
PROC TABULATE NOSEPS MISSING FORMAT=comma7. FORMCHAR=' ' data=sashelp.cars;
CLASS make;
class type drivetrain / style={background=lightyellow};
/*Make Table*/
tables all*(n f=5.1*pctn<make all>)
(type all)*(pctn<type all>)*f=5.1
(drivetrain all)*(pctn<drivetrain all>)*f=5.1,
all make / nocellmerge rts=16 misstext='--' box=_page_ printmiss;
keylabel all='Total' n='No.' pctn='%';
run;
/*Origin Table*/
PROC TABULATE NOSEPS MISSING FORMAT=comma7. FORMCHAR=' ' data=sashelp.cars;
CLASS origin;
class type drivetrain / style={background=lightyellow};
tables all*(n f=5.1*pctn<origin all>)
(type all)*(pctn<type all>)*f=5.1
(drivetrain all)*(pctn<drivetrain all>)*f=5.1,
all origin /nocellmerge rts=16 misstext='--' box=_page_ printmiss;
keylabel all='Total' n='No.' pctn='%';
run;
ods tagsets.tableeditor close;
This produces the following tables. As you can see in the second table, the row headers "Type" and "DriveTrain" are blue rather than light yellow as in the first table.
However, the background color does seem to populate correctly when looking at the SAS output table.
This looks like a defect with tagsets.tableeditor.
Contact tech support.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.