Date: Thu, 19 Jun 2008 09:15:15 -0500
Reply-To: "data _null_," <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_," <datanull@GMAIL.COM>
Subject: Re: How to selectively change formats with PROC REPORT
In-Reply-To: <EE977A7ACA588B428067FF35914D38E90330D7AA@SXGM-401.fg.rbc.com>
Content-Type: text/plain; charset=ISO-8859-1
ERROR: There is no statistic associated with "variable".
To get this to work you just need a helper variable. It does not even
have to be in your data. See usage of DUMMY below. You could call it
"necessaryEvil".
proc report data=sashelp.class nowd list headline;
columns age sex, name dummy;
define age / group;
define sex / across;
define name / display;
define dummy / noprint;
break after age / skip;
run;
On 6/19/08, Lane, Jim <jim.lane@rbc.com> wrote:
> Hi, All
>
> I have a PROC REPORT job as follows
>
> proc report data=work.tp nowd style(report)={outputwidth=100%};
> column item instance, v;
> define item / group "";
> define instance / across "TSM Instance" ;
> define v / "" format=9.1;
> by loc;
> run;
>
> For certain values of item the corresponding value of v is actually a
> time in seconds. For those rows I'd like to be able to print the output
> as HH:MM:SS and for all other rows just print v as a number. In fact v
> is really a display variable but PROC REPORT won't let me define that
> below an across variable so I'm jumping through hoops here. Is there a
> way to make this work with a compute block? I know I can use CALL DEFINE
> to set a format. Is that the way to do this? Is there a simpler or more
> direct way to format a display variable under an across variable?
>
> TIA
>
> -Jim Lane
>
> _______________________________________________________________________
>
> This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations.
> Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized.
> If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.
>
> Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent.
> Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite.
> Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.
>
|