Using Alternating Background Color with PROC REPORT

/ Published in: SAS
Save to your folder(s)

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

Copy this code and paste it in your HTML
  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;
  11. FONT_Weight=BOLD]");
  12. end;
  13. endcomp;
  14. run;


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.