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.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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