Hi
You will need to create a graph for each school district. An then include those graphs in the Proc REPORT
See the example below, it just creates the one graph which is used for all the schools.
ods _all_ close;
Data Ranks;
Length RateRank 8 SchDist $ 20 VarCount 8 VarRate 8;
Infile Datalines Missover;
Input RateRank SchDist VarCount VarRate;
Datalines;
1 Auburn 523 720
2 Seattle 3425 560
3 Higline 662 543
4 SouthCentral 90 539
5 Kent 785 524
6 Renton 429 407
7 Shoreline 225 334
8 FederalWay 424 338
9 Tahoma 69 198
10 SnoqualmieValley 61 183
;
Run;
*
* load all the SAS/GRAPH macros
*;
%annomac
Data Anno;
*
* declare the variables used by the annotate macros
*;
%dclanno
*
* set the coordinate system, in our case % of graphics area
*;
xsys="3";
ysys="3";
*
* set how to measure size for text (pt)
*;
hsys="D";
*
* use macros to create two bars and a text
*;
%Bar(0,0,100,100,cx0000ff,0,e);
%Bar(0,0,75,100,cxff0000,0,s);
%LABEL(100, 50, "75", cx000000, 0, 0, 8, none , <);
Run;
ods listing;
OPTIONS printerpath=postscript;
filename bar 'c:\temp\barsample.png';
goptions reset=all;
goptions
device=png gsfname=bar
xpixels=100 ypixels=25;
;
Proc gslide Anno=Anno;
Run;
Quit;
ods listing close;
Proc Format;
Value ColorList
1-3="cxff0000"
4-6="cxff9999"
7-10="cxffeeb8"
11-13="cx9999ff"
14-16="cx0000ff"
17-19="white"
;
Value TextColor
1,2,3='white'
other='black'
;
RUN;
ods html file="c:\temp\sample.html";
PROC REPORT data=Ranks nowd;
Columns RateRank SchDist
("Selected Measure" VarCount VarRate);
Define RateRank / "Rank" group style=[background=ColorList. foreground=TextColor.];
Define SchDist / "School District";
Define VarCount / "Count";
Define VarRate / "Rate";
RUN;
PROC REPORT data=Ranks nowd;
Columns RateRank SchDist
("Selected Measure" VarCount VarRate)
showBar
;
Define RateRank / "Rank" group;
Define SchDist / group "School District";
Define VarCount / "Count";
Define VarRate / "Rate";
Define ShowBar / "Relative Rate" computed;
compute ShowBar / char;
call define(_col_,'style',"style=[preimage='c:\temp\barsample.png']");
endcomp;
Run;
ods html close;
Bruno
... View more