?
Solved

crystal alternate row

Posted on 2014-03-14
10
Medium Priority
?
251 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:Seven price
[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
  • 5
  • 5
10 Comments
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 2000 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:Seven price
ID: 39931286
Ok but it gives me error because its looking for numeric and im using text  values
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Author Comment

by:Seven price
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:Seven price
ID: 39935201
I get an error boolean required here.
0
 
LVL 101

Expert Comment

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

What formula?

mlmcc
0
 
LVL 9

Author Comment

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

Expert Comment

by:mlmcc
ID: 39935968
What version of Crystal?

mlmcc
0
 
LVL 9

Author Closing Comment

by:Seven price
ID: 39937682
tks
0
 
LVL 101

Expert Comment

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

mlmcc
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. 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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

752 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