cancel
Showing results for 
Search instead for 
Did you mean: 

How to color alternate columns of cross tab in crystal report

Chetanalm
Explorer
0 Kudos

in case of grouping hierarchy is more than one color the cells below the group header with same color as header color and alternate the colors of columns. alternate column color.png

Accepted Solutions (0)

Answers (1)

Answers (1)

Chetanalm
Explorer

Shared NumberVar GroupCount;
groupcount:= getindexof("<name of first group>",GridRowColumnValue ("<name of first group>"));
if groupcount mod 2 =0 then crsilver else crwhite;

JWiseman
Active Contributor
0 Kudos
Thanks Chetanalm for sharing what worked out for you. Let me know if you have cases where the crosstab goes into multiple pages and the colour formatting isn't lining up the way you want. In cases where there is more than 1 page on your crosstab that can lead to issues when combined with cells with 0 values based on nulls. In some cases that can be corrected by adjusting your report page size to have a large Horizontal value.