BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
bnawrocki
Quartz | Level 8

I'd like to set the style of the summary (total) row of PROC REPORT to match the existing style of the header row in a PROC REPORT output. As an example, here's starting PROC REPORT code:

 

proc report data=sashelp.class;
  columns sex weight;
  define sex / group;
  define weight / analysis mean f=5.2;
  rbreak after / summarize;
run;

I'm using the default template -- HTMLBlue  -  so output looks like this:

 

pic1.PNG

But, I'd like to make the summary row resemble the header row -- so I opened the template, found colors used in "header" item, and copied them to my PROC REPORT code, like this:

 

proc report data=sashelp.class;
  columns sex weight;
  define sex / group;
  define weight / analysis mean f=5.2;
  rbreak after / summarize style=[fontweight=bold
    color=cx112277 backgroundcolor=cxEDF2F9];
run;

and gives me what I want:

pic2.PNG

But is there a better way? Can I reference the existing "header" style on the rbreak line, instead of hard-coding its attributes, like I did?

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
Diamond | Level 26

Hi:
Yes, you are exactly on the right track. You could:
proc report data=sashelp.class
      style(summary)=Header;
or
rbreak after / summarize style=Header;

Cynthia

View solution in original post

1 REPLY 1
Cynthia_sas
Diamond | Level 26

Hi:
Yes, you are exactly on the right track. You could:
proc report data=sashelp.class
      style(summary)=Header;
or
rbreak after / summarize style=Header;

Cynthia

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 842 views
  • 1 like
  • 2 in conversation