Solved

crystal alternate row

Posted on 2014-03-14
10
246 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

828 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