BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

Hello

I want to  add background lightgrey color to  only to 2 rows:

Total    .   66    20

and 

a1   Total    60  30

 

I want also that two titles "groupCategory"    and "Information"  will in red color

 

 

I want  also that column z1 will be bold

Can anyone help please?

 

 

 

 

Data tbl;
Input Z1 $ Z2 $ X Y;
Cards;
a1 b1 10 5
a1 b2 20 10
a1 b3 30 15
a1 Total 60 30
a2 b1 1 2
a2 b2 2 4
a3 b3 3 6
a3 Total 6 8
Total . 66 20
;
Run;

PROC REPORT DATA=tbl nowd SPANROWS
style(header)={background=white};
Column ("groupCategory" z1 z2 )
("Information" X Y );
DEFINE z1 /Display 'Department' style(header)={background=lightblue};
DEFINE z2 /Display 'Team' style(header)={background=lightblue};
DEFINE x /Display "לקוחות" style(header)={background=lightblue};
DEFINE y /Display "אובליגו " style(header)={background=lightblue};
Run;

1 REPLY 1
RW9
Diamond | Level 26 RW9
Diamond | Level 26

For the groupcategory and information you would likely need to use inline styles, this is escape character styles, something like:

ods escapechar="^";
...
proc report...
  column ("^s={background=red}groupCategory" z1 z2)...;
...
run;

For the total you would use a compute/endomp block and call define the right style, here is a paper on it with examples:

https://support.sas.com/resources/papers/stylesinprocs.pdf

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
  • 1023 views
  • 0 likes
  • 2 in conversation