Hi,
Below is the proc report i am trying to run,my objective is to color the date cells where modified_date column values is more than 365 days behind the current date.
I am using compute block for this. I am unable to color the cells of Modified_Date column but i have applied a similar compute for File_Size and the color is coming fine.it seems to me a data type issue, can you please guide me.
Also Please note: Modified_Date is numeric.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
proc report data=final1 nowd split='~' headline headskip nowd
style(REPORT)={rules=all bordercolor=black cellspacing=1}
style(header)={borderwidth=0 borderspacing=0 backgroundcolor=cx6495ED color=white font_size=16pt font_face='Franklin Gothic Demi Cond'};
column Owner Group Modified_Date File_Size Filename ;
*column ('Business directory utilisation'('As of - "&SYSDATE."' Owner File_Size Modified_Date Filename)) ;
define Owner / STYLE(HEADER)=[JUST=LEFT];
define File_Size / STYLE(HEADER)=[JUST=LEFT];
define Modified_Date / STYLE(HEADER)=[JUST=LEFT];
define Filename / STYLE(HEADER)=[JUST=LEFT];
compute File_Size;
if substr(File_Size,1,length(File_Size)-1) > 50 then
call define (_col_,"style","style={background=lightgreen}");
if substr(File_Size,1,length(File_Size)-1) > 100 then
call define (_col_,"style","style={background=lightblue}");
if substr(File_Size,1,length(File_Size)-1) > 200 then
call define(_col_,"style","style={background=lightred}");
endcomp;
compute Modified_Date;
if intck('days',Modified_Date1,today()) > 365 then
call define(_col_,"style","style= {background=lightred}");
endcomp;
run;
... View more