BookmarkSubscribeRSS Feed
ScottBass
Rhodochrosite | Level 12

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


Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.
2 REPLIES 2
Andre
Obsidian | Level 7

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

Andre
Obsidian | Level 7

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;

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 740 views
  • 0 likes
  • 2 in conversation