Hi: First you need the images. Let's assume the names of the images are arrow_green.png, arrow_red.png and arrow_left.png. Then you need the code. If you need to do the calculation AND the traffic lighting in the same program, then PROC REPORT would be my procedure of choice. The code below produced the attached screen shot. I didn't do anything to resize the images to be smaller and I only used 3 obs to make the final report. But it shows making a calculation and doing the trafficlighting. cynthia ods pdf file='c:\temp\tlite_arrow.pdf'; proc report data=sashelp.class nowd; column name age sex height weight calccol arrow; where name in ('Alfred', 'Joyce', 'Alice' ); title 'use arrows'; define name / order; define age / display; define sex / display; define height / analysis; define weight / analysis; define calccol / computed; define arrow / computed; compute calccol; calccol = weight.sum - height.sum; endcomp; compute arrow; if calccol lt 0 then do; call define (_col_,'style','style={preimage="c:\temp\Arrow_left.png"}'); end; else if 1 < calccol le 40 then do; call define (_col_,'style','style={preimage="c:\temp\Arrow_red.png"}'); end; else if calccol gt 40 then do; call define (_col_,'style','style={preimage="c:\temp\Arrow_green.png"}'); end; endcomp; run; ods _all_ close;
... View more