BookmarkSubscribeRSS Feed
☑ This topic is solved. 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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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