Date: Fri, 5 Mar 2010 18:23:47 -0500
Reply-To: Ya Huang <ya.huang@AMYLIN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ya Huang <ya.huang@AMYLIN.COM>
Subject: Traffic lighting for character variables?
Hi there,
For numeric var, we can define range in format to control the
cell background/foreground. What about character var?
data xx;
s='123523'; output;
s=' 234'; output;
s='Abc dd'; output;
run;
ods pdf file="c:\temp\junk.pdf" style=printer;
proc format;
value $msbg
low-high='white'
other='black'
;
options missing='';
proc print data=xx;
var s / style=[background=$msbg.];
run;
ods pdf close;
My goal is to make s black background, if s value includes any letter
other than numbers (0-9). For the above data, obs=3 has value 'Abc dd',
which is not all numnbers, therefore, this cell need to be black.
Maybe picture format?
Thanks
Ya
|