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;
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:
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.