|Date: ||Thu, 15 Jun 2006 05:55:54 -0700|
|Reply-To: ||kat j <axnjxntx@YAHOO.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||kat j <axnjxntx@YAHOO.COM>|
|Subject: ||Re: Traffic Lighting in Proc Report|
|Content-Type: ||text/plain; charset=iso-8859-1|
I have done something similar to this...and even asked
about it on the list.
There are a couple of thoughts that come to mind...
For some reason I think that the order of variables in
the column statement must be the same order that
they're defined - here in this case, you have move
listed last in the column statement, yet you define it
in the second define statement. I'm not 100% sure
about this, but I think this is the case. I'm sure
someone on the list will correct me on this.
Secondly...here is the response that I had received (I
believe it was Richard DeVenezia - THANKS!) when I
asked the question - and it works!
kat j wrote:
> 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.
> define flg2 / display ;
> 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.
You need to use the REPORT oxymoron "display noprint"
define flg2 / display noprint;
I didn't know about style statdoc -- nice look.
ods html file="%sysfunc(pathname(WORK))foo.xls"
proc report data=sashelp.class headline headskip nowd;
column name age weight height ;
define name / display ;
define age / display ;
define weight / display ;
define height / display noprint;
if height=69 then do;
call define (_row_,
ods html close;
--- Darren Morris <dmorris@QANTAS.COM.AU> wrote:
> It is well known that you can traffic Light in proc
> report either using
> proc format or in the proc report step. I have seen
> traffic lighting based
> on the value of a variable ie, greater than some
> However does any one know how I can traffic light a
> variable based on the
> value of a different variable??? whilst not having
> that second variable
> appear in the report.?
> This doesnt appear to work.
> proc report data=forods nowindows spacing=0 ;
> by model;
> column model reg tnum move;
> define model / noprint group ;
> define move / noprint;
> define reg / group 'Aircraft';
> define tnum / display ' ' ;
> define tnum / display mean ;
> compute after model;
> compute reg;
> if move > 0 then
> break after model / summarize style=rowheader;
> 'tnum' is the variable to be traffic lighted and
> move contains either 1 or
> 0. The report is not to show the variable 'move'
> So turn tnum value red if move = 1.
> Would appreciate any advice at al on this.
> Should I have used proc template instead?
> Thank you
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around