# Reporting crosstab alternate rows

**URL:** <https://forum.inductiveautomation.com/t/reporting-crosstab-alternate-rows/72171>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [April 6, 2023, 9:28pm UTC](https://forum.inductiveautomation.com/t/reporting-crosstab-alternate-rows/72171 "2023-04-06T21:28:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [April 6, 2023, 9:28pm UTC](https://forum.inductiveautomation.com/t/reporting-crosstab-alternate-rows/72171/1 "2023-04-06T21:28:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [April 6, 2023, 10:28pm UTC](https://forum.inductiveautomation.com/t/reporting-crosstab-alternate-rows/72171/2 "2023-04-06T22:28:45Z")

</div>

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.
