Solved

How do I Alternate font color as account # changes in group with suppression

Posted on 2011-02-23
4
395 Views
Last Modified: 2012-05-11
My report compares records comprised of 5 fields from 2 systems and prints a record when the records do not match. In my printing group I suppress those records that match. Often times I will print more than one record with the same account number. I need to alternate font color when the account number changes.  
I have tried a few options that were posted. One prints alternating color (does not take into consideration the account)
Shared NumberVar gr_cnt;
if ({#Record Count}) <> 0 then
gr_cnt := gr_cnt + 1;
if gr_cnt  mod 2 = 0 then
  crNoColor
else
 Crsilver

So I tried a running total that changes only when the account changes & using the above formula, but I get a Print time formula error because I am using the Next funtion. Anyone have an idea? Thanks in advance.
0
Comment
Question by:Goosie1
[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
  • 2
  • 2
4 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 34962193
I am not clear on what you are trying to do.

You want to change the color when the account changes
FontCOlor - Normal
Account 1234
Record1
Record2
FontColor - crSilver
Account 1235
Record1
Record2
etc

I assume you have the records grouped by account number
Simply update your count in the group header formula that sets the font color  I dont see the NEXT function being used.

Did you setup your running total to evaluate On Change of Account Group?

mlmcc


0
 

Author Comment

by:Goosie1
ID: 34962566
Sorry I will try to be more clear.
Group 1 Account - suppressed
Group 2 Service Code- suppressed
Group 3 Date- suppressed
Group 4 Formula which concatenates Account+Service Code+Date - Supress if the concatenated string matches

So I may have 5 records for account 123, but in group 4 Only 3 of them will display because they do not match.
To print I want to see Nocolor:
Account 123 Code A Date 1/1/11
Account 123 Code A Date 1/2/11
Account 123 Code B Date 1/1/11
Then the next account records that don't match would print CRSilver

I tried to use the Next function in a formula in Group 4:
@Account Count:
If Account= next(Account)then 0 else 1)
Then in the Group 4 Color(Note #Record Count is my suppression criteria):
Shared NumberVar gr_cnt;
if ({#Record Count}) <> 0 and {@Account count} = 0
then
gr_cnt := gr_cnt + 1;
if gr_cnt  mod 2 = 0 then
  crsilver
else
  crnocolor

This works for some records, but not all.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 500 total points
ID: 34963268
WHy not use the group select expert to eliminate the groups with more than 1 record.

Count({@Group4}) = 1

mlmcc
0
 

Author Closing Comment

by:Goosie1
ID: 34969964
You rock!
I hadn't thought of that!  I removed extra groups then added the count of Group 4 = 1 which cleaned up the data so much. Now it is running perfectly.
Thanks so much!
Michelle
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

627 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