Link to home
Start Free TrialLog in
Avatar of nobile00
nobile00

asked on

Alternating Colors on Groups Crystal Reports

Hi All

I have a report that has 4 Groups and I would like to alternate same  colors on Group 3 and Group 4.

For example if the first color is blue then Group 3 and Group 4 would be blue for that record and the next record Group 3 and 4 would white and so on.

Is there a way this can be accomplished?

Any help greatly appreciated.

Thanks in advance
Avatar of Mike McCracken
Mike McCracken

Is this by record or for the group since a group can have more than 1 record.

mlmcc
Avatar of nobile00

ASKER

Groups so group 3 and 4 would be blue at 1st set of records then group 3 and 4 would have white for the second set of records and so I on hope that makes sense.  Let me know if you need more info.

Thanks
Basically you want

GH3 - BLUE
GH4
Details
Details
GF4
GH4
Details
Details
GF4
GF3
GH3 - WHITE
GH4
Details
Details
GF4
GH3 - BLUE  etc

mlmcc
like this
GH3 - BLUE
GH4-Blue
GH3 - WHITE
GH4-White
GH3 - BLUE
GH4-Blue
GH3 - WHITE
GH4-White
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

For the Group 3 Formula below I am getting an error from Crystal that this part of the formula doesn't appear to be part of the formula.
If GroupCount MOD 2 = 0 then
    {@ICONTeal}
Else
    crWhite



WhilePrintingRecords;
Global NumberVar GroupCount;
GroupCount := GroupCount + 1
If GroupCount MOD 2 = 0 then
    {@ICONTeal}
Else
    crWhite

Missing a ; after GroupCount + 1

WhilePrintingRecords;
Global NumberVar GroupCount;
GroupCount := GroupCount + 1;
If GroupCount MOD 2 = 0 then
    {@ICONTeal}
Else
    crWhite

mlmcc
The formulas worked perfectly.

Thanks so much