Solved

crystal alternate row

Posted on 2014-03-14
10
243 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

14 Experts available now in Live!

Get 1:1 Help Now