LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments:   To: Darren Morris <dmorris@QANTAS.COM.AU>
In-Reply-To:   <200606150548.k5F1uu3V018406@mailgw.cc.uga.edu>
Content-Type:   text/plain; charset=iso-8859-1

Darren -

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

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.

Sample:

ods noptitle; ods html file="%sysfunc(pathname(WORK))foo.xls" style=statdoc;

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;

compute height; if height=69 then do; call define (_row_, "style","style=[background=yellow]"); end; endcomp;

run; 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 > threshold. > 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; > reg='FltAve'; > endcomp; > compute reg; > if move > 0 then > call > define(_col_,"style","style={background=red}"); > endcomp; > > break after model / summarize style=rowheader; > run; > > '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 http://mail.yahoo.com


Back to: Top of message | Previous page | Main SAS-L page