The SAS Output Delivery System and reporting techniques

PROC REPORT /order statement & compute

Reply
Regular Contributor
Regular Contributor
Posts: 170

PROC REPORT /order statement & compute

Hello all;
I have two groups that are color coded based on certain parameters. The call define statement works just fine if I do not use the order parameter. However based on the code below it properly colors the first observation in each group.
However I need the order statement to separate the two groups.

The code follows below. _NAME_ is actually the category but was renamed in the proc transpose statement...

Any suggestions helpful... Thanks...

proc report nowd;
COLUMNS _NAME_ UNIT _1 _200807 _200808 _200809 _200810 _2;
DEFINE _NAME_ /order " " style={background=lavender};
DEFINE _1/"FY08";
DEFINE _2/"FYTD";


compute _2;
if _NAME_='VAP RATE (per 1000 device days)' THEN DO;
IF substr(_2,1,3)>1.3 then do;
call define (_col_, 'style','style={background=light red}');
end;
end;
if _NAME_='VAP RATE (per 1000 device days)' THEN DO;
IF substr(_2,1,3)<1.3 then do;
call define (_col_, 'style','style={background=light green}');
end;
end;
endcomp;
Regular Contributor
Regular Contributor
Posts: 170

Re: PROC REPORT /order statement & compute

If I add a category I can get it to work properly,
but then if I format the the order by variable to names it will order them alphabetically-how do I stop this-

And how I suppress or leavea column intentially blank...
Thanks..

Lawrence
Regular Contributor
Regular Contributor
Posts: 170

Re: PROC REPORT /order statement & compute

Nevermind I got it...
Ask a Question
Discussion stats
  • 2 replies
  • 84 views
  • 0 likes
  • 1 in conversation