Symptom
You have a report that contains groups and you would like to diferentiate the groups with the use of colours.
Cause
Resolution
You need to assign a sequential number to each group. You can do so by using the function Running Total Fields:
- From the "View" menu, choose "Field Explorer".
- Right-click on "Running Total Fields" and select "New".
- Assign a name to the "Running Total Field", for instance "Assign_number".
- From "Create Running Total Field" window, select the field that define your group as "Field to summarize".
- Tick evaluate "On change of group".
Now you need to conditionally assign some colours to the groups:
- From "Report" menu, open "Section Expert".
- On the left window of "Section Expert", choose Group Header.
- On the right window of "Section Expert", select "Color" tab.
- Select the "X+2" button and the "Formula workshop" window will open.
- Write the following formula:
If Remainder({#Assign_number},2)<>0 then crBlue else crRed
- Save and close the "Formula workshop" window.
Using the above formula and refreshing the report, you will see the first group of the page in Blue, the second in Red, the third in Blue and so on.
Keywords
make different, group, differentiate, colours, running total field , 9264933 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To