• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 510
  • Last Modified:

Crystal Reports : Background Color

crystal 8.5

I want to highlight records in pairs (so, for example, record 1 and 2 are green, 3 and 4 are white, 5 and 6 are green)

i have
if RecordNumber mod 2 = 0 then color(148,233,196)
else
color(255,255,255)

which gives me every other record... how to i get it to color by pairs of records?

thanks
0
zephyr_hex (Megan)
Asked:
zephyr_hex (Megan)
  • 3
1 Solution
 
bdreed35Commented:
Try this:

if RecordNumber mod 4 in [0,1] then color(148,233,196)
else
color(255,255,255)
0
 
bdreed35Commented:
Slight change:

if RecordNumber mod 4 in [1,2] then color(148,233,196)
else
color(255,255,255)
0
 
zephyr_hex (Megan)DeveloperAuthor Commented:
bingo!

thanks ;)

does [1,2] represent the array positions for RecordNumber?
0
 
bdreed35Commented:
No, it represents the remainder value that the MOD function returned.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now