Print Page | Close Window

custom background color

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7686
Printed Date: 28 Apr 2024 at 4:46am


Topic: custom background color
Posted By: kirandb
Subject: custom background color
Date Posted: 14 Sep 2009 at 10:25am
I have to dynamically set the custom background color for every other row. I tried the following code in the formula editor for the bakground color.

if RecordNumber mod 2 = 0 then crCustom else crNoColor.
 
1)  It didnt work. DO I have name the custom color. If so how do i do it?
 
2) I have 3 detail sections which gets suppressed conditionally and all 3 sections have the above background color formula to display background color for alternate rows. My question is does this formula gets applied for each detail section or the entire report ?
 
Thanks,
Kiran
 
 


-------------
share your knowledge



Replies:
Posted By: DBlank
Date Posted: 14 Sep 2009 at 10:38am
Place it on all 3 detail sections and replace the crCustom with either a color name or a RBG value
Examples:
if RecordNumber mod 2 = 0 then crSilver else crNoColor
 
if RecordNumber mod 2 = 0 then Color (236,242,242) else crNoColor



Print Page | Close Window