The SAS Output Delivery System and reporting techniques

Spanned Header: Changing the font size/type and background color

Reply
Frequent Contributor
Posts: 144

Spanned Header: Changing the font size/type and background color

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;

SAS Super FREQ
Posts: 8,864

Re: Spanned Header: Changing the font size/type and background color

Hi:

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

cynthia

Frequent Contributor
Posts: 144

Re: Spanned Header: Changing the font size/type and background color

Posted in reply to Cynthia_sas

Hi Cynthia--

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

Thanks!

SAS Super FREQ
Posts: 8,864

Re: Spanned Header: Changing the font size/type and background color

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?

Ask a Question
Discussion stats
  • 3 replies
  • 327 views
  • 0 likes
  • 2 in conversation