Have code as noted below and would like to have the "all" data in bold as indicated by the style statement ((SLAB_GRD_FAM_NAME=' ' all) all*[style=[font_weight=bold]],
), but it has no effect. I think that it's being overridden by the subsequent style statement.What's the remedy please? (Using v8.2) Thank you for your help.
The rule of thumb for Tabulate in SAS 8.2 is that "Column wins" -- in the setting of formats and in the setting of style. So you are exactly right....what is specified in the column dimension is clobbering what is specified in the row dimension.
In SAS 9, two new options were added to Tabulate that allowed you to set which dimension "wins" in the setting of format and style. Those options are:
col_dim / style_precedence=row format_precedence= row;
STYLE_PRECEDENCE and/or FORMAT_PRECEDENCE changes the default behavior. The values can be either PAGE, ROW or COL.
I'm not sure there ever was a workaround for this in SAS 8.2 -- you might consider doing the report with PROC REPORT, because the equivalent of the ALL lines in Tabulate would be written with either the BREAK or the RBREAK statements and in Proc Report, you can have multiple variables nested as ACROSS variables and have multiple variables nested as GROUP variables and then the summary highlighting can be applied just to the summary lines, as shown in the code below:
ods html file='c:\temp\report_across_style.html'
proc report data=sashelp.prdsale nowd
title 'PROC REPORT Nested Vars Across and STYLE overrides';
column ('Country' country)('Region' Region)
('Grand Total' actual=gtot);
define country / group ' ';
define region / group ' ';
define prodtype / across;
define division / across ' ';
define actual / sum ' ';
define gtot / sum ' '
rbreak after / summarize;
break after country /summarize;
compute after country;
line ' ';
Country = 'Total';
ods html close;