/ Published in: SAS

Adding alternating row of color to make proc report output easier to read.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
proc report data=sashelp.prdsale; where region = "®ION." and Country = "&COUNTRY"; column Country Region Division ProdType Product Year Quarter Predict Actual; define Predict / analysis mean 'Predicted Sales (Avg)'; define Actual / analysis mean 'Actual Sales (Avg)'; /* begin row alternating code */ compute Country; count+1; if (mod(count,2)) then do; "STYLE=[BACKGROUND=#EEE8DC /* FOREGROUND=WHITE */ FONT_Weight=BOLD]"); end; endcomp; run;
URL: http://www.bi-notes.com/2012/10/stored-process-using-alternating-background-color-with-proc-report/
Comments
