Solved

Alternating Colors on Groups Crystal Reports

Posted on 2011-02-28
8
350 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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

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
 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 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