Date: Fri, 12 Nov 2010 13:29:51 -0800
Reply-To: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject: Re: Can you bold a single cell in summary row?
In-Reply-To: <AANLkTimSr0tMcE9e4VBOWf5TsQ2x1UvPz_Enfw+1-Th_@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"
Awesome. Thanks Yu, that works.
From: Yu Zhang [mailto:zhangyu05@gmail.com]
Sent: Friday, November 12, 2010 12:08 PM
To: Terjeson, Mark
Cc: SAS-L@listserv.uga.edu
Subject: Re: Can you bold a single cell in summary row?
I think by testing if _BREAK_ is missing, you can conditionally format
a cell.
HTH
Yu
ods html file="class.htm";
proc report data=sample nowd;
column quarter id foo value;
define quarter /group order=internal descending;
define id /group;
define foo /analysis;
define value /analysis;
break after quarter /summarize skip
style=[background=cxEEEEEE];
compute foo;
if not missing(_BREAK_) then
call define(_col_,"style","style={font_weight=bold
font_size=14pt}");
endcomp;
run;
ods html close;
On Fri, Nov 12, 2010 at 12:25 PM, Terjeson, Mark <Mterjeson@russell.com>
wrote:
Hi All,
re: PROC REPORT - Can you bold a single cell in summary row?
This particular SAS environment is v8.2
As you can see below we can bold a column(report#2),
and even a single cell(report #3).
But so far only on the datarows.
The question is: Is it possible to bold a single cell in the "summary"
row?
i.e. I want to BOLD only the 50.8 value for the 30sep group summary
data sample;
quarter = '30sep2010'd; id=1; foo=.; value=ranuni(0); link
output;
quarter = '30sep2010'd; id=2; foo=11.3; value=ranuni(0); link
output;
quarter = '30sep2010'd; id=3; foo=18.6; value=ranuni(0); link
output;
quarter = '30sep2010'd; id=4; foo=20.9; value=ranuni(0); link
output;
quarter = '30jun2010'd; id=1; foo=14.2; value=ranuni(0); link
output;
quarter = '30jun2010'd; id=2; foo=22.2; value=ranuni(0); link
output;
quarter = '30jun2010'd; id=3; foo=15.5; value=ranuni(0); link
output;
quarter = '30jun2010'd; id=4; foo=21.9; value=ranuni(0); link
output;
quarter = '31mar2010'd; id=1; foo=13.3; value=ranuni(0); link
output;
quarter = '31mar2010'd; id=2; foo=15.7; value=ranuni(0); link
output;
quarter = '31mar2010'd; id=3; foo=26.4; value=ranuni(0); link
output;
quarter = '31mar2010'd; id=4; foo=29.8; value=ranuni(0); link
output;
format quarter date9.;
return;
output:
qtr_copy=quarter; * GROUPing by quarter in PROC REPORT will not have
;
* the quarter value actually there for each
datarow;
* so use this spare copy to do evaluations
with. ;
output;
return;
run;
* report 1 ;
ods html file="C:\temp\class.htm";
proc report data=sample nowd;
column quarter id foo value;
define quarter /group order=internal descending;
define id /group;
define foo /analysis;
define value /analysis;
break after quarter /summarize skip
style=[background=cxEEEEEE];
run;
ods html close;
* report 2 - can bold a column ;
ods html file="C:\temp\class.htm";
proc report data=sample nowd;
column quarter id foo value;
define quarter /group order=internal descending;
define id /group;
define foo /analysis;
define value /analysis;
break after quarter /summarize skip
style=[background=cxEEEEEE];
compute foo;
call define(_col_,"style","style={font_weight=bold}");
endcomp;
run;
ods html close;
* report 3 - can bold a single datarow cell ;
ods html file="C:\temp\class.htm";
proc report data=sample nowd;
column quarter id qtr_copy foo value;
define quarter /group order=internal descending;
define id /group;
define qtr_copy /group noprint;
define foo /analysis;
define value /analysis;
break after quarter /summarize
style=[background=cxEEEEEE];
compute foo;
if qtr_copy eq '30sep2010'd
and id eq 4 then
call define(_col_,"style","style={font_weight=bold}");
endcomp;
run;
ods html close;
Mark Terjeson
Investment Business Intelligence
Investment Management & Research
Russell Investments
206-505-2367
Russell
Global Leaders in Multi-Manager Investing
The information contained in this message is intended only for the use
of the recipient named above. This message may contain confidential or
undisclosed information. If the reader of this message is not the
intended recipient or an agent responsible for delivering to the
intended recipient, you are hereby notified that you have received this
message in error, and that any review, dissemination, distribution or
copying of it is strictly prohibited. If you have received this message
in error, please notify us by telephone immediately at 206-505-2367.
Thank you for your cooperation.