我正在编写一个用proc report显示以下记录的代码。我想用红色高亮显示每行中的最大值。我已经尝试了代码,但它高亮显示了不同的值。请提供以下代码的更正以正确显示高亮值。
data records;
input a1 a2 a3 a4 a5;
cards;
37 95 80 52 85
94 . 7 10 14
64 5 71 14 92
. 55 38 . 46
;
run;
proc report data=records nowd;
column a1 a2 a3 a4 a5;
define a1/display;
define a2/display;
define a3/display;
define a4/display;
define a5/display;
compute a1;
if a1=Max(a1,a2,a3,a4,a5) then call define('a1','style','style={foreground=white background=red}');
endcomp;
compute a2;
if a2=Max(a1,a2,a3,a4,a5) then call define('a2','style','style={foreground=white background=red}');
endcomp;
compute a3;
if a3=max(a1,a2,a3,a4,a5) then call define('a3','style','style={foreground=white background=red}');
endcomp;
compute a4;
if a4=max(a1,a2,a3,a4,a5) then call define('a4','style','style={foreground=white background=red}');
endcomp;
compute a5;
if a5=max(a1,a2,a3,a4,a5) then call define('a5','style','style={foreground=white background=red}');
endcomp;
run;