×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Crystal reports how to set background for alternate records

Crystal reports how to set background for alternate records

Crystal reports how to set background for alternate records

(OP)
How is it possible to conditionally format the background color in the cross tab section so that the background will alternate every 1 record. The first record will be one color, the next  record will be another color, the next  record will be back to the first color... etc...

RE: Crystal reports how to set background for alternate records

I don't know for a cross tab but I'll give you what i did  on a detail section, so give it a try maybe it'll work too.

First, you create two detail sections exactly with the same fields. after, you go in the format section and

for detail a you check the box "Supress(nodrill down), click on the condition button and write

remainder (recordnumber,2)<>0

for detail b same thing except the condition is:

remainder (recordnumber,2)=0

And finally for one of the detail section, you set a background color...

That's it.  That's how I make one line gray, one line white, one line gray..

I hope it will work with cross tab.

RE: Crystal reports how to set background for alternate records

(OP)
How do I create two detail sections . I mean from insert section its created detaila and detail b but if I try to copy my cross tab from rep[ort header it doesnt copy? I will appreciate if U can reply back .

thanks

RE: Crystal reports how to set background for alternate records

Sorry I didn't remember that a cross tab was in the report header..  But I'm looking for a solution...

RE: Crystal reports how to set background for alternate records

For the moment I found how to insert a blank or whateever the color you want between each row
but not how to alternate color for each row

RE: Crystal reports how to set background for alternate records

Sorry

All I found was how to conditionnally format a cell.  it would have been helpful if the condition coulb be 1 row / 2
but I can't figure how

It's stupid that CR don't allow us to do that...

Good luck anyway

RE: Crystal reports how to set background for alternate records

In the fomat detail section, click color tap, then click that button, CR will give you a code window. Write following code there:

if remainder(recornumber,2,0) then silver else nocolor

hope this can help you

lucy

RE: Crystal reports how to set background for alternate records

sorry, wrong sytax. this is good one

if remainder(recordnumber,2)=0 then silver else nocolor

lucy
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close