From: Paige Miller on
let's say I have two variables in PROC REPORT, which I have creatively
named X1 and X2. I'd like to set the background of X1 to be yellow if
X2 is negative, and make no change to the background if X2 is zero or
positive.

Can this be done? Here is my code to produce the report with no
background shading, but I haven't figured out how to do the background
shading.

proc report nowindows data=whatever;
columns x2 x1;
define x2/noprint;
define x1/display "X1";
run;

Thanks

--
Paige Miller
paige\dot\miller \at\ kodak\dot\com
From: Ya on
On Jun 9, 6:34 am, Paige Miller <paige.mil...(a)kodak.com> wrote:
> let's say I have two variables in PROC REPORT, which I have creatively
> named X1 and X2. I'd like to set the background of X1 to be yellow if
> X2 is negative, and make no change to the background if X2 is zero or
> positive.
>
> Can this be done? Here is my code to produce the report with no
> background shading, but I haven't figured out how to do the background
> shading.
>
> proc report nowindows data=whatever;
>     columns x2 x1;
>     define x2/noprint;
>     define x1/display "X1";
> run;
>
> Thanks
>
> --
> Paige Miller
> paige\dot\miller \at\ kodak\dot\com

ods html file="c:\temp\junk.html";

proc report data=sashelp.class nowd;
column weight height;
define weight/display noprint;
define height/display;
compute height;
if weight < 100 then call
define(_col_,"style","style=[background=yellow]");
endcomp;
run;

ods html close;

Note the key here is define weight has both display and noprint option
(I'm surprised they can coexist!)

HTH

Ya