Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

crystal alternate row

Posted on 2014-03-14
10
Medium Priority
?
252 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

610 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