Solved

Alternating Colors on Groups Crystal Reports

Posted on 2011-02-28
8
346 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:nobile00
  • 4
  • 4
8 Comments
 
LVL 100

Expert Comment

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

mlmcc
0
 

Author Comment

by:nobile00
ID: 34999180
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
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34999484
Basically you want

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

mlmcc
0
 

Author Comment

by:nobile00
ID: 35000049
like this
GH3 - BLUE
GH4-Blue
GH3 - WHITE
GH4-White
GH3 - BLUE
GH4-Blue
GH3 - WHITE
GH4-White
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 35000564
There is only 1 G4 for each G3?

GH3 - BLUE
GH4-Blue
GH4 - ???
GH4 - ???
GH3 - WHITE
GH4-White
GH3 - BLUE
GH4-Blue
GH3 - WHITE
GH4-White

If there is only one then try this idea
Add a formula to the report header
WhilePrintngRecords;
Global NumberVar GroupCount;
""

Add a formula to the GH3 background formula
WhilePrintngRecords;
Global NumberVar GroupCount;
GroupCount := GroupCount + 1
If GroupCount MOD 2 = 0 then
    crBlue
Else
    crWhite

GH4 formula
WhilePrintngRecords;
Global NumberVar GroupCount;
If GroupCount MOD 2 = 0 then
    crBlue
Else
    crWhite

mlmcc
0
 

Author Comment

by:nobile00
ID: 35001309

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

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35001456
Missing a ; after GroupCount + 1

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

mlmcc
0
 

Author Closing Comment

by:nobile00
ID: 35087203
The formulas worked perfectly.

Thanks so much
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now