Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal reports how to set background for alternate records

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
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...
 
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.

 
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
 
Sorry I didn't remember that a cross tab was in the report header.. But I'm looking for a solution...
 
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
 
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

 
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
 
sorry, wrong sytax. this is good one

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

lucy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top