Solved

Alternating Colors on Groups Crystal Reports

Posted on 2011-02-28
8
355 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 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