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

Reply
Frequent Contributor
Posts: 142

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

Hi all--

Does anyone know how to modify the style of a spanned header?  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;

Frequent Contributor
Posts: 95

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

Depending on your Base SAS version the latter syntax might not work.

If you are running 9.2 or later I think both should work.

In your case replace the line reading

column  ('Special Medical Review Overall Score' totalAwarded Total_Possible  Final_score) ;

with

column  ('^{style [font_face='Courier New' background=blue font_size=14pt foreground=yellow]Special Medical Review Overall Score}' totalAwarded Total_Possible  Final_score) ;


Don't forget to include the line "ods escapchar='^';" in your code before starting to produce ods output.

Zafer

ods escapchar='^';

ods pdf file='D:\temp\test.pdf';

proc report data=sashelp.prdsale nowd;

  column ("^S={font_face='Courier New' background=blue font_size=14pt foreground=yellow}Spanned Header ^S={}" Country Year Product) PREDICT;

  define Country / group id;

  define Year / group id;

  define Product / group id;

  define Predict / analysis;

run;

proc report data=sashelp.prdsale nowd;

  column ("^{style [font_face='Courier New' background=blue font_size=14pt foreground=yellow]Spanned Header}" Country Year Product) PREDICT;

  define Country / group id;

  define Year / group id;

  define Product / group id;

  define Predict / analysis;

run;

ods pdf close;

Ask a Question
Discussion stats
  • 1 reply
  • 203 views
  • 0 likes
  • 2 in conversation