Date: Thu, 23 Jun 2005 11:06:37 -0700
Reply-To: Jeff Voeller <Jeff.Voeller@MCI.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jeff Voeller <Jeff.Voeller@MCI.COM>
Subject: Re: Proc report & ODS
In-Reply-To: <20050623140926.67701.qmail@web51507.mail.yahoo.com>
Content-type: text/plain; charset=us-ascii
I had a similar problem a while back and was helped by a nice person on
this list. If you change the code in your COMPUTE block to reference
flg2 as "_c4_" (i.e., an alias that translates to "column number four",
the position of flg2 in your column statement), it will work:
compute flg2;
if _c4_=1 then do;
call define (_row_, "style",
"style=[background=yellow]");
end;
endcomp;
I would be lying if I said I fully understood why this is necessary or
why it works.
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of kat
j
Sent: Thursday, June 23, 2005 7:09 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Proc report & ODS
I am using Proc Report and outputting into an HTML
file. I've got it doing almost everything that I
want, however, I'm stuck on one part.
I have a dummy variable (flg2) that I'm using in a
compute block to highlight the row depending on the
value of flg2. However, I don't want to print flg2.
This code works, but it prints the flg2 variable. Is
there a way to get the highlighting w/o printing the
flg2 variable?
ods noptitle;
ods html file="l:\test.xls"*/
style=statdoc;
proc report data=quit headline headskip nowd;
where quit12=1 and (covar ne .);
column _state covar rowper flg2;
define _state / display format=st.;
define covar / display format=covar.;
define rowper / display format=6.2;
define flg2 / display ;
compute flg2;
if flg2=1 then do;
call define (_row_, "style",
"style=[background=yellow]");
end;
endcomp;
run;
ods html close;
When I change the line to:
Define flg2 / noprint;
I don't get the highlighting that I want, and I get
the note about flg2 being uninitialized.
Is there a way to do this?
Thanks.
-Kat
____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com