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;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.