Reporting crosstab alternate rows

I would like to configure the reporting crosstab component to have alternating colors for each row. I know this can be done for the regular table, and setting the Style property to List 1 does cause the row colors to alternate, so it seems like this should be possible.

I don't like setting the Style property, because I can't control the color of the alternate rows and it also sets other formatting I don't like. Is it possible to get controllable alternating colors in a crosstab?

I figured out a way to do it. It doesn't feel like this is the best way, so I'd be glad to hear a better method.

  • Set a keychain variable in the top left cell. I used zRunningCount.
    • zRunningCount=0
  • In the Text of each row, increment this variable. This doesn't show up in the report.
    • @zRunningCount+=1@
    • You want this in a column that doesn't repeat itself column-wise. In the crosstab, this is the first column
  • For each cell you want highlighted, set Fill to True and use a keychain expression for the color.
    • zRunningCount%2?"FFEEB3":"FFF9E6"
    • You have to do this for each column and row in the design section that you want to have the alternating highlighting.

Like I said, it seems like there should be an easier way, but this does work.