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

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;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
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;

 

Ksharp_0-1647432068423.png

 

Try Traffic Light.

View solution in original post

1 REPLY 1
Ksharp
Super User
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;

 

Ksharp_0-1647432068423.png

 

Try Traffic Light.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 889 views
  • 1 like
  • 2 in conversation