Hi all--
Does anyone know how to modify the style of a spanned header? So, how do you change the font, size, background color ect. Thanks!
proc report
data=All_Spec_Med_Qs_TotalScore nowd headline headskip
style(column)={just=c font_size=11pt font_face= 'Arial Narrow'cellwidth=2in}
style(header)={font_size=11 pt font_face= 'Arial Narrow' FONT_WEIGHT =BOLD background=cxcccccc};
column ('Special Medical Review Overall Score' totalAwarded Total_Possible Final_score) ;
define Final_score / display
style(column)={ cellwidth=2in};
run;
Hi:
What is your destination of interest? The available methods may look different in RTF and PDF vs HTML.
cynthia
Hi Cynthia--
I thank you for your great help in advance. The destination of interest is PDF.
Thanks!
Hi:
I don't quite understand what you want, then. Your PROC REPORT code already shows one of the methods to change the style of the spanning header -- your header should be the same style (background, color, font, etc) as the other headers because of this line in your code (blue😞
proc report data=All_Spec_Med_Qs_TotalScore nowd headline headskip
style(column)={just=c font_size=11pt font_face= 'Arial Narrow'cellwidth=2in}
style(header)={font_size=11 pt font_face= 'Arial Narrow' FONT_WEIGHT =BOLD background=cxcccccc};
column ('Special Medical Review Overall Score' totalAwarded Total_Possible Final_score) ;
That style override should also have an impact on your spanning header. Are you saying that you do NOT want the spanning header to be the same style as the other headers? How would you change the string 'Special Medical Review Overall Score' to be different??? You could just put that string into a TITLE statement or an ODS TEXT= statement. Usually when you put a spanning header into your report table, above the other column headers, the assumption is that you want the spanning header to be the same style as the other headers, this is why STYLE(HEADER) on the PROC REPORT statement has the effect that it does have.
cynthia
Added: It also seems like you were trying to use a TITLE statement in this previous post: https://communities.sas.com/message/127085#127085 ... is that posting related at all to this posting? Do you have 1 report or 3 reports? Are you also using STARTPAGE=NO with PDF? If so, in PDF, titles from the first procedure are the only titles that will appear on the page. So if you need some kind of sub-title between each procedure, then you are on the right track with spanning headers. Another alternative is ODS TEXT between procedures. Is your question really about spanning headers or is it about titles?
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!
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.