Symptom
How to change the color of group header alternately.
Environment
- Crystal Reports XI R2
- Crystal Reports 2008
Resolution
1. Create a formula that will count the Group Header in the following way:
Formula name: Count of Group Header
WhilePrintingRecords;
numberVar cnt;
cnt := cnt + 1;
cnt;
2. Place this formula "@Count of Group Header" in the Group Header. The above formula will work as a counter.
3. Create a formula for getting the alternate color change on Group Header in the following way:
a) On the Report menu, click Section Expert .
b) Then select the Group Header where you have placed the formula "@Count of Group Header" and click the Color Tab.
c) Select the Background Color check box and then click the X+2 button, Use the following formula in the Formula Workshop.
iif (Remainder({@Count of Group Header}, 2) = 0, crAqua, crRed)
d) Click the "Save and Close" button and then click "OK" to close the Section Expert.
Keywords
Group header, color change, Alternate color change. , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To