hi, if I add a variable flag_2; data aaa;
set sashelp.class;
order=_n_;
if name="Barbara" then do;
flag_2="Y";
comment_2="Her name is Barbara";
end;
if name="Jane" then do;
flag_3="Y";
comment_3="Her Gender is Female";
end;
if name = "Carol" then flag_new="New";
flag_1="";
flag_4="";
flag_5="";
run;
proc report data=aaa;
columns age name sex height weight flag_2;
define age /display style=[just=l cellwidth=2.0cm tagattr='type:String format:0'];
define name /display style=[just=l cellwidth=2.0cm tagattr='type:String format:Text'];
define sex /display style=[just=l cellwidth=2.0cm tagattr='type:String format:Text'];
define height /display style=[just=l cellwidth=2.0cm tagattr='type:String format:0'];
define weight /display style=[just=l cellwidth=2.0cm tagattr='type:String format:0'];
define flag_2/noprint;
compute name;
* Cell comment;
if flag_2="Y" and name^="" then call define(_col_, "style", "style=[background=green flyover='Her name is Barbara']");
/*this code indicate that if the flag_2 is Yes, I will let the cell get the green color and add a comment "Her name is Barbara"*/
endcomp;
run; why doesn't the code work? the cell for name="Barbara" DON'T get the green color
... View more