PROC REPORT / Highlighting not working ? :-(

  • Follow


Hi,

I am building a report and I would like the background colour of the
cells in column field2 if the corresponding cell in field8 is = 1. I
don't get any colour at all and I am not sure what I am doing wrong?

proc report data= xxx.&v_metauser.xxx nowindows;
	columns field1 field2 field3 field4 field5 field6 field7;
	define field1 / order noprint;
	define field8 / display noprint ;
	title 'INFORMATION';

compute after field1;
field4='TOTAL:' ;
endcomp;

break after field1 /  summarize ;

/*Add Colours*/
%let colour_1 = light yellow;
%let colour_2 = light brown;

COMPUTE field2;
if field8= 1 then
	CALL DEFINE(_COL_ , "style" ,"style=[background=&colour_2]");
ENDCOMP;
run;
0
Reply sasuser2010 (17) 8/10/2010 1:14:11 PM

correction... I meant to say I want to change the background of the
entire row and not a cell.

Thanks
lee
0
Reply Lee 8/10/2010 2:13:42 PM


On Aug 10, 7:13=A0am, Lee Jenson <sasuser2...@googlemail.com> wrote:
> correction... I meant to say I want to change the background of the
> entire row and not a cell.
>
> Thanks
> lee

I think the easiest way to do that is change _COL_ to _ROW_  in your
CALL DEFINE Statement.

Let us know if that works.

Andrew Karp
Sierra Information Services
http://www.sierrainformation.com
0
Reply Andrew 8/11/2010 6:04:54 PM

whoops

sorry.. it was the _ROW_ and also I was using the wrong field in the
compute.
Thanks
Lee :-))))))))))))))))))))))) yipeeeeeeeeeeeeeeeee
0
Reply Lee 8/16/2010 11:13:23 AM

On the same issue... do you know why my compute only highlights 1 row
rather than the expected 3. I have 3 records in tflag that equal to 1
but only one of the records changes colour.
0
Reply Lee 8/16/2010 11:21:36 AM

whoops... this is the compute

COMPUTE tflag;
if tflag = 1 then
	CALL DEFINE(_ROW_ , "style" ,"style=[background=&colour_2]");
ENDCOMP;
0
Reply Lee 8/16/2010 11:22:07 AM

I have fixed this now.... It was summarising the data causing null
data to confuse the highlighting logic.
Lee
0
Reply Lee 8/16/2010 2:05:19 PM

6 Replies
393 Views

(page loaded in 0.082 seconds)

Similiar Articles:













7/24/2012 6:03:59 AM


Reply: