我发现如果我想在标题之后为第 1 列着色,我必须添加“RowNum+1;”。没有它,如果我更改数字,我的代码将永远无法工作。有人能告诉我为什么吗?非常感谢!
proc report data=final_report15 nowindows split='*'
style(header)={foreground=white};
column category Work_types2 tot_act day0 day1 day2 day3 day4 day5_9 day_11 ph tot_pend day0_p day1_p day2_p day3_p day4_p;
define category/'#' style(header)=[background=grey];
define Work_types2/'Work types' style(header)=[background=grey];
define tot_act/'# in active*queue' style(header)=[background=Deepskyblue];
define day0/'Day 0' style(header)=[background=Deepskyblue];
define day1/'Day 1' style(header)=[background=Deepskyblue];
define day2/'Day 2' style(header)=[background=Deepskyblue];
define day3/'Day 3' style(header)=[background=Deepskyblue];
define day4/'Day 4' style(header)=[background=Deepskyblue];
define day5_9/'Day 5-10' style(header)=[background=Deepskyblue];
define day_11/'Day 11+' style(header)=[background=Deepskyblue];
define ph/' ' style(header)=[background=Black];
define tot_pend/'Pending Total' style(header)=[background=orange];
define day0_p/'Day 0' style(header)=[background=orange];
define day1_p/'Day 1' style(header)=[background=orange];
define day2_p/'Day 2' style(header)=[background=orange];
define day3_p/'Day 3' style(header)=[background=orange];
define day4_p/'Day 4' style(header)=[background=orange];
title "Pend Queue Report - Wipro";
compute day1;
RowNum+1;
if ((RowNum>=2 and RowNum<=7) or (RowNum>=9 and RowNum<=10) or (RowNum>=12 and RowNum<=13) or (RowNum>=15 and RowNum<=18) or (RowNum>=20 and RowNum<=31)) then do;
call define(_col_,'style','style=[background=yellowgreen]');
end;
endcomp;
if ((RowNum>=2 and RowNum<=7) or (RowNum>=9 and RowNum<=10) or (RowNum=12) or (RowNum>=15 and RowNum<=18) or (RowNum>=20 and RowNum<=25) or (RowNum>=27 and RowNum<=31)) then do;
call define(_col_,'style','style=[background=yellowgreen]');
end;
if (RowNum=13 or RowNum=26) then do;
call define(_col_,'style','style=[background=gold]');
end;
endcomp;
run;