Solved

crystal alternate row

Posted on 2014-03-14
10
244 Views
Last Modified: 2014-03-18
if ({ItemRowCount}) mod 0 = 1 then crSilver else crNoColor]

Open in new window


Like to change row by Description. So if I got a brand of groups I want to alternate the row. for example.

brand

pep       <color white
pep       <color white
pep        <color white
cok      <color grey
cok      <color grey
cok      <color grey
sev      <color white
sev     <color white
0
Comment
Question by:sevensnake77
  • 5
  • 5
10 Comments
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 500 total points
ID: 39930545
YOu can't mod by 0.

Mod is the remainder when you divide

Try

if ({ItemRowCount} mod 2 = 1) then crSilver else crNoColor

mlmcc
0
 
LVL 9

Author Comment

by:sevensnake77
ID: 39931286
Ok but it gives me error because its looking for numeric and im using text  values
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39931599
What is itemrowcount?

Are you counting rows?

Try this

In the report header add a formula
WhilePrintingRecords;
Global NumberVar GroupCounter;
""

In the group header add a formula
WhilePrintingRecords;
Global NumberVar GroupCounter;
GroupCounter := GroupCounter + 1;
""

In the detail section color formula
WhilePrintingRecords;
Global NumberVar GroupCounter;
If GroupCounter mod 2 = 0 then
    crSilver
Else
   crNoColor

mlmcc
0
 
LVL 9

Author Comment

by:sevensnake77
ID: 39932540
Ok I give it a tryy item count I was using rownumber in the procedure to try to conver my text column value to numeric
0
 
LVL 9

Author Comment

by:sevensnake77
ID: 39935201
I get an error boolean required here.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 100

Expert Comment

by:mlmcc
ID: 39935518
WHere are you using it?

What formula?

mlmcc
0
 
LVL 9

Author Comment

by:sevensnake77
ID: 39935848
In the detail section color formula
WhilePrintingRecords;
Global NumberVar GroupCounter;
If GroupCounter mod 2 = 0 then
    crSilver
Else
   crNoColor
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 39935968
What version of Crystal?

mlmcc
0
 
LVL 9

Author Closing Comment

by:sevensnake77
ID: 39937682
tks
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 39937903
Did you get it to work?

mlmcc
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 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

24 Experts available now in Live!

Get 1:1 Help Now