I am trying to color code sections in a report.
I can get the groups column A to color code correctly. The first row in each group also print the proper color. However, all other rows in the group are un-colored.
The first column, section_number, is evaluated to determine which color value to use in my existing code.
Any help would be GREATLY appreciated.
Brad
Current Code:
%let blu=#DDEBF7; %let yel=#FFF2CC; %let grn=#E2EFDA; %let pnk=#FFC7CE;
title; footnote; ods escapechar='^'; options center nodate nonumber orientation=landscape; ods _all_ close; ods listing close; ods tagsets.excelxp file="\\t002pmid03\sasdata\jordan\temp\legend.xml" style=sansprinter;
ods tagsets.excelxp options(frozen_headers='1' autofilter='yes' autofit_height='yes' sheet_name="Legend" absolute_column_width="30,10,40,40"); proc report data=legend spanrows split='~' noheader; columns Section_Number Section_Name Column_ID Column_Name Column_Desc color; define section_number / group order noprint; define section_name / group; define column_id / display; define column_name / display; define column_desc / display; compute column_desc / char; if section_number = 0 then do; call define('section_name',"style","style={background=white vjust=m }"); call define('column_id' ,"style","style={background=white vjust=m }"); call define('column_name' ,"style","style={background=white vjust=m }"); call define('column_desc' ,"style","style={background=white vjust=m }"); end; if section_number = 1 then do; call define('section_name',"style","style={background=&blu vjust=m }"); call define('column_id' ,"style","style={background=&blu vjust=m }"); call define('column_name' ,"style","style={background=&blu vjust=m }"); call define('column_desc' ,"style","style={background=&blu vjust=m }"); end; if section_number = 2 then do; call define('section_name',"style","style={background=&yel vjust=m }"); call define('column_id' ,"style","style={background=&yel vjust=m }"); call define('column_name' ,"style","style={background=&yel vjust=m }"); call define('column_desc' ,"style","style={background=&yel vjust=m }"); end; if section_number = 3 then do; call define('section_name',"style","style={background=&grn vjust=m }"); call define('column_id' ,"style","style={background=&grn vjust=m }"); call define('column_name' ,"style","style={background=&grn vjust=m }"); call define('column_desc' ,"style","style={background=&grn vjust=m }"); end; endcomp; run;
ods _all_ close;
Current Output Desired Output
... View more