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!

Color every other record. 2

Status
Not open for further replies.

Red01

IS-IT--Management
Jul 13, 2001
8
US
Does anyone know how to color every other record in a report (for ease of reading?)
 
If you are dealing with detail records (not group footers)
then simply set the Background color property to something like:
if Remainder(Recordnumber,2) = 0 then White else Gray

Cheers,
- Ido ixm7@psu.edu
 
Thanks a lot Ido--it worked great. :)

 
I have the same problem, except the information I want to have alternate shading on is in the Groups. I found some coding in another report, similar to this, but it is not working for my report.

This is in my Group Header #2, on the Color Tab/Background Color formula key.

If Remainder (Groupnumber, 2)<>0
Then Color (240,240 ,240 )
Else Color (255,255,255)

I am really new to Crystal, so I apologize if I don't use the right terminology.

Thanks,
Becky
 
Hi all,

I have also tried the 'remainder' function to alternate background and that works BUT if you have activated 'suppress if blank lines' or define a formula that delete the blank lines, that does not work anymore. You have for ex 5 lines grey then 10 blank the 3 grey and so on ..
thx
 
good point...I suppose if you are suppressing some records this would not work.

That is why I don't base my counterflag this way...I set it up as an independent sum...such that if the record is displayed then the sum is incremented...that way there is no problem controling the shading Jim Broadbent
 
I use a running total for linebar type display in the groupfooter.

First I create a running total called ColorCounter.

The field I summarize on is based upon the group footer displaying the data, in my example:
Group4 is Item, so the field to summarize is Item
Type of Summary is Count
Evaluate on the chg of group Item
Reset (in my particular case, it's reset on the next higher level group displayed).

Then in the section format, color tab, I click on the formula button for background color and enter the following:
if remainder({#ColorCounter},2) <>0 then color(227,232,251) else nocolor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top