Trying to color sub headings same colour as column headers.
I want "Summary of CAD T5008 SLIPS" to be pink and "Summary of USD T5008 SLIPS" to be cream
but they are coming steelblue.
proc report data=xggg nowd
style (report) = [cellspacing = 1 borderwidth = 1 bordercolor = black cellpadding = 8 rules = all]
style (header) = [foreground = black font_size =4 background = steelblue font_weight = bold ]
style (column) = [foreground = black font_size=3 background = white];
column ("T5008 SLIPS SUMMARIES REFLECTED IN CANADIAN DOLLARS"
("Summary of CAD T5008 SLIPS" cadDV cadBV )
("Summary of USD T5008 SLIPS" usdDV usdBV ))
;
define cadDV / display "DIPOSTION VALUE" style(header)=[just=center font_weight=bold background = pink] ;
define cadbV / display "BOOK VALUE" style(header)=[just=center font_weight=bold background = pink] ;
define usdDV / display "DIPOSTION VALUE" style(header)=[just=center font_weight=bold background = cream] ;
define usdbV / display "BOOK VALUE" style(header)=[just=center font_weight=bold background = cream] ;
run;
data test;
input pid age gender race drug1 $ drug2 $ event1 $ event2 $;
cards;
101 21 1 1 parac oflox diarr fever
102 21 2 1 dig oflox heada fever
103 31 1 1 nim oflox heada fever
104 43 2 1 dig oflox heada fever
;
run;
proc format;
value $ fmt
"Summary data"="red"
"Demography"="orange"
"concomitant"="green"
"Adverse Event"="blue"
;
run;
ods tagsets.excelxp file='c:\temp\want.xls' style=htmlblue ;
proc report data=test nowd style(header)={background=$fmt.};
columns
('Summary data'
('Demography' pid age)
('concomitant' race gender drug1 drug2)
("Adverse Event" event1 event2)
);
define pid/display ;
run;
ods tagsets.excelxp close;
Try Traffic Light.
data test;
input pid age gender race drug1 $ drug2 $ event1 $ event2 $;
cards;
101 21 1 1 parac oflox diarr fever
102 21 2 1 dig oflox heada fever
103 31 1 1 nim oflox heada fever
104 43 2 1 dig oflox heada fever
;
run;
proc format;
value $ fmt
"Summary data"="red"
"Demography"="orange"
"concomitant"="green"
"Adverse Event"="blue"
;
run;
ods tagsets.excelxp file='c:\temp\want.xls' style=htmlblue ;
proc report data=test nowd style(header)={background=$fmt.};
columns
('Summary data'
('Demography' pid age)
('concomitant' race gender drug1 drug2)
("Adverse Event" event1 event2)
);
define pid/display ;
run;
ods tagsets.excelxp close;
Try Traffic Light.
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 the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.