Posted By

webonomic on 11/02/12


Tagged

background color report proc


Versions (?)

Using Alternating Background Color with PROC REPORT


 / Published in: SAS
 

URL: http://www.bi-notes.com/2012/10/stored-process-using-alternating-background-color-with-proc-report/

Adding alternating row of color to make proc report output easier to read.

  1. proc report data=sashelp.prdsale;
  2. where region = "&REGION." and Country = "&COUNTRY";
  3. column Country Region Division ProdType Product Year Quarter Predict Actual;
  4. define Predict / analysis mean 'Predicted Sales (Avg)';
  5. define Actual / analysis mean 'Actual Sales (Avg)';
  6. /* begin row alternating code */
  7. compute Country;
  8. count+1;
  9. if (mod(count,2)) then do;
  10. "STYLE=[BACKGROUND=#EEE8DC /* FOREGROUND=WHITE */
  11. FONT_Weight=BOLD]");
  12. end;
  13. endcomp;
  14. run;

Report this snippet  

You need to login to post a comment.