|Date: ||Mon, 27 Oct 2003 09:43:24 -0600|
|Reply-To: ||"Smith, Curtis, Mr, DCAA" <Curtis.Smith@DCAA.MIL>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||"Smith, Curtis, Mr, DCAA" <Curtis.Smith@DCAA.MIL>|
|Subject: ||Re: PROC REPORT, two questions|
|Content-Type: ||text/plain; charset="us-ascii"|
I handle the issue in your first question by using a data step to
replace the missing values with a zero.
If vc=. then vc=0;
From: Talbot Michael Katz [mailto:topkatz@MSN.COM]
Sent: Sunday, October 26, 2003 1:51 AM
Subject: PROC REPORT, two questions
I am using PROC REPORT for some simple grouping and counting as
proc report data = dsi (keep = vr vc)
out = dso (drop = _break_)
nowd headline nocenter missing ls = 100
column ("View of vr by vc" ""
vr vc,(pctn)) ;
define vr / group format = fvro. width =
10 "Row values" ;
define vc / across width =
12 "" ;
define pctn / format = percent15.1
I have two problems, MISSING VALUES and ROW ORDER.
Some combinations of the two variables, vc and vr, are not represented
in the data, and they show up as missing values in the report output.
Because these amount to zero counts, I'd like them to show up as zeroes,
specifically as "0.0%" if possible (since the cell values are
percentages, as specified by pctn). Can this be done?
Also, I want the rows to come out in order of the original vr values,
but with the formatted values (fvro. user-defined format) printed.
However, the formatted values have a different order than the original
values, and the report comes out in the order of the formatted values.
Is there a way to preserve the order of the original values, but print
the formatted values?
-- TMK --