Hi,
proc report data=sashelp.class nowd;
columns sex name age height weight;
define sex / order;
define name / display;
define age / display;
define height / analysis;
define weight / analysis;
break after sex / summarize skip style={background=gray};
rbreak after / summarize skip style={background=cyan};
quit;
How do I style the individual elements of the summary line?
As a silly example:
Height / Break: bold, Arial, blue
Weight/ Break: italics, Times New Roman, green
Height / RBreak: bold underline, Courier, red
Height / RBreak: normal, Arial, black
You don't have to provide code that does all that (heck, you don't even have to answer 😉 ), but you get the idea of the control I'm after.
I think I just need to know the style name for the individual cells that make up the summary line.
If it matters, the output is HTML.
Thanks,
Scott
Scott,
i think that traffic colors may apply
through this kind of code
compute actual;
if _break_='SEX' then do;
call define ('_C4_','style','style={foreground=fmtfor. font_style= font_weight= }');
call define ('_C5_','style','style={foreground=fmtfor. font_style= font_weight= }');
end;
else if _break_='_RBREAK_' then do;
other cal define for the columns
end;
endcomp;
HTH but not tested
Andre
here with a litle test
Proc format;
value rbrone low-high='PINK';
value rbrtwo low-high='BROWN';
run;
proc report data=sashelp.class nowd;
columns sex name age height weight ;
define sex / order;
define name / display;
define age / display;
define height / analysis;
define weight / analysis;
break after sex / summarize suppress style={background=yellow};
rbreak after / summarize skip style={background=gray};
compute after;
if _break_='_RBREAK_' then do;
call define ('_C4_','style','style={foreground=rbrtwo.}');
call define ('_C5_','style','style={foreground=rbrone.}');
end;
endcomp;
run;
quit;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.