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

Hi,

I want to color the whole row , say _N_=3 and I dont know how to do it.

Can you please help?

Thank you,

HHCFX

proc report data=sashelp.class nowd ;
	define     /display;
compute    ;
     if     then call define(_row_,"style","style={background=red}");
  endcomp;
run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

Do like this

 

proc report data=sashelp.class nowd;
  column name age sex height weight;
  define name / display;
  define age / display;
  define sex / display;
  define height / display;
  define weight / display;
  compute age;
    count+1;
    if count=3 then
       call define(_row_,"style","style={background=red}");
  endcomp;
run;

View solution in original post

2 REPLIES 2
PeterClemmensen
Tourmaline | Level 20

Do like this

 

proc report data=sashelp.class nowd;
  column name age sex height weight;
  define name / display;
  define age / display;
  define sex / display;
  define height / display;
  define weight / display;
  compute age;
    count+1;
    if count=3 then
       call define(_row_,"style","style={background=red}");
  endcomp;
run;
hhchenfx
Rhodochrosite | Level 12

Thanks a lot for your help.

HHC

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand in the Innovate Hub.

Watch 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
  • 2 replies
  • 1457 views
  • 2 likes
  • 2 in conversation