Date: Tue, 3 Mar 2009 15:43:49 -0600
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: Question on Proc Report: how to change row color upon a
change in ID?
Content-Type: text/plain; charset=ISO-8859-1
You certainly could pre-calculate a variable in a data step using first.id:
if missing(idcolor) then idcolor=1;
else if first.id and idcolor=1 then idcolor = 2;
else if first.id and idcolor=2 then idcolor=1;
and then use that in a COMPUTE block
if idcolor = 1then do;
else if idcolor=2 then
I imagine you can do it entirely within proc report but I'm still a newbie
at that so I don't know the answer directly.
On Tue, Mar 3, 2009 at 3:25 PM, Mary <email@example.com> wrote:
> Is there a way in Proc report to change the row color
> upon a change in ID? I've got a report with ID, Visit,
> and some other variables, and would like to block
> each ID by alternating colors upon a change in ID,
> not just a change in row, such as light blue, light yellow;
> I have a varying number of visits per patient, such as 1-15.