BookmarkSubscribeRSS Feed
Cynthia_sas
Diamond | Level 26
Hi:
About #2...the only way I know to get the empty cells above region or product formatted is to set the default for ALL the headers to the color you want those cells (black/white) and then override all the other headers in DEFINE statements to be the other colors you want.

cynthia
[pre]
ods listing close;
ods tagsets.ExcelXp file='header_ques.xls' style=sasweb
options(embedded_titles='yes' sheet_name='Business Unit HA' absolute_column_width='9');
title 'make ALL headers white and black and then override the ones you want different';
proc report data=sashelp.shoes nowd
style(headers)={foreground=black background=white font_weight=bold};
where product in ('Boot', 'Sandal', 'Slipper');
column region product, ( sales inventory returns);
define region / group;
define product / across style(header)={foreground=white background=green};
define returns/ sum ;
define inventory / sum style(header)={foreground=black background=cyan};
define sales / sum style(header)={foreground=black background=cyan};
run;
ods _all_ close;[/pre]

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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 save with the early bird rate—just $795!

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
  • 15 replies
  • 4533 views
  • 0 likes
  • 2 in conversation