BookmarkSubscribeRSS Feed
Mgarret
Obsidian | Level 7

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;

3 REPLIES 3
Cynthia_sas
SAS Super FREQ

Hi:

  What is your destination of interest? The available methods may look different in RTF and PDF vs HTML.

cynthia

Mgarret
Obsidian | Level 7

Hi Cynthia--

I thank you for your great help in advance. The destination of interest is PDF.

Thanks!

Cynthia_sas
SAS Super FREQ

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?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

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
  • 3 replies
  • 2093 views
  • 4 likes
  • 2 in conversation