The SAS Output Delivery System and reporting techniques

Change style of summary line in PROC REPORT

Reply
Super Contributor
Posts: 376

Change style of summary line in PROC REPORT

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

Super Contributor
Posts: 273

Re: Change style of summary line in PROC REPORT

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

Super Contributor
Posts: 273

Re: Change style of summary line in PROC REPORT

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;

Ask a Question
Discussion stats
  • 2 replies
  • 225 views
  • 0 likes
  • 2 in conversation