LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2012, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 21 Mar 2012 17:32:33 -0400
Reply-To:   Ann Mackey <thearchies@LIVE.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Ann Mackey <thearchies@LIVE.COM>
Subject:   Alternating Row Color, SPANROWS, PROC REPORT

I'm using PROC REPORT and ODS EXCELXP tagset with SPANROWS. I'm having a problem with coloring alternate rows.

proc report data=custexpired split='*' spanrows ; column rowvar keyring label enddt sn cn flagit ; define rowvar / group noprint ; define flagit / computed noprint ; define keyring / group 'Keyring' ; define label / order 'Key Label' ; define enddt / display format=mmddyy10. 'Expires' ; define sn / order 'Serial*Number' ; define cn / order 'Common*Name' ; * color every other row light blue) compute rowvar ; if mod(rowvar,2) = 0 then do ; call define(_row_,'style', 'style={background=cxccffff}') ; end; endcomp;

My report looks like:

------------------------------------------+ | Keyring |Key Label|Expires|Serial Number|. . . . +---------+---------+-------+-------------+ | | Label1 |12/31 | 13 | <-- white | +---------+-------+-------------+ | Keyring1| Label2 |11/01 | 13 | <-- white | (white) +---------+-------+-------------+ | | Label3 |10/12 | 0 | <-- white +---------+---------+-------+-------------+ | | Labela |09/15 | 14 | <-- Blue | +---------+-------+-------------+ | keyring2| Labelb |07/01 | 14 | <-- white | (blue) +---------+-------+-------------+ | | Labelc |06/05 | 12 | <-- white +---------+---------+-------+-------------+

I want it to look like:

------------------------------------------+ | Keyring |Key Label|Expires|Serial Number|. . . . +---------+---------+-------+-------------+ | | Label1 |12/31 | 13 | <-- white | +---------+-------+-------------+ | Keyring1| Label2 |11/01 | 13 | <-- white | (white) +---------+-------+-------------+ | | Label3 |10/12 | 0 | <-- white +---------+---------+-------+-------------+ | | Labela |09/15 | 14 | <-- BLUE | +---------+-------+-------------+ | keyring2| Labelb |07/01 | 14 | <-- BLUE | (blue) +---------+-------+-------------+ | | Labelc |06/05 | 12 | <-- BLUE +---------+---------+-------+-------------+

Any guidance is appreciated!


Back to: Top of message | Previous page | Main SAS-L page