BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
gzr2mz39
Quartz | Level 8

Currently the header background color (ie CXBBBFAC) is only shown for ydoi1, clm_num, bop_grp, and task.
Does anyone know why the header background color is not being displayed for oergo1, msd1, and fall1?
Everything else works as expected.

proc format;
value ydoif 2010="2010"
             2011="2011 YTD"
;
value $colorf 'Yes'='Yellow'
;
run;

ods tagsets.excelxp file="C:\file.xls"
style=journal
options(frozen_headers='1'
      autofit_height='yes'
      absolute_column_width='8,9,18,14,8,6,9'
   sheet_interval='none' sheet_name='Corp'
   embedded_footnote='yes')
;
proc report data=class5 nowd contents="Claims" out=test
style(header)=[font_weight=bold background=CXBBBFAC /*yellowish grey*/];
options missing='';
column ydoi1 clm_num task bop_grp oergo1 msd1 fall1;
define ydoi1 / '' format=ydoif. style(column)={font_weight=bold just=l};
define clm_num / 'Claim #' width=14 style(column)={just=l};
define task / 'Task';
define bop_grp / 'Body Part';
define oergo1 / 'Office' style={background=$colorf.};
define msd1 / 'MSD' style={background=$colorf.};
define fall1 / "STF" style={background=$colorf.};
compute clm_num;
  if clm_num = "" then call define(_row_,"style","style=[background=CXE599A7]" /*light pink*/);
endcomp;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
Tim_SAS
Barite | Level 11

In a define statement, by default the style option affects both the data rows and the header rows, so the style options on the define statements for oergo1, msd1, and fall1 override the style option on the proc statement. Change those style options to style(column) to match the style options on the other define statements.

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000146851.htm#a00053...

View solution in original post

1 REPLY 1
Tim_SAS
Barite | Level 11

In a define statement, by default the style option affects both the data rows and the header rows, so the style options on the define statements for oergo1, msd1, and fall1 override the style option on the proc statement. Change those style options to style(column) to match the style options on the other define statements.

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000146851.htm#a00053...

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
  • 1 reply
  • 2723 views
  • 0 likes
  • 2 in conversation