General discussion

Locked

Crystal Reports Question

By galahad04 ·
I have created a basic table using Crystal Reports 8.5. I would like to enhance the table's formatting by adding a color background fill for every other row. In other words, the first row has a green background fill, the second row is plain white, the third cell has the green fill, the fourth row is white, etc.

Unfortunately, I have so far been unable to find a way to do this in Crystal Reports. It seems to be easy to make either all or none of rows have a background fill, but not the alternating color scheme I am looking for. Also, I can?t use the cross-tab feature because the table has only column headings and no row headings -- so this is not an option.

Could someone please give step-by-step instructions on how to add the alternating background color fill feature if they know how? Thanks

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Crystal Reports Question

by maxwell edison In reply to Crystal Reports Question

You can define custom colors when writing a conditional formatting formula for the font or background color of a report field.

(1) Select a field and right click, select 'Format Field'

(2) Click on the 'Font Tab'

(3) Click on the 'X2' button to the right of the 'Color Field'

(4) Enter a conditional formula

Example:

if CurrentFieldValue > 10000 then
Color (150,230,150)
else
Color (10,19,200)


Here some common colors:

White: (255,250,250)
Almond: (250,235,215)
Black: (0,0,0)
Gray: (190,190,190)
Light Gray (211,211,211)
Midnight Blue (25,25,211)
Royal Blue (65,105,225)
Navy (0,0,12
Cyan (0,255,255)
Light Cyan (224,255,255)
Green (0,255,0)
Dark Green (0,100,0)
Lawn Green (124,252,0)
Green Yellow (173,255,47)
Yellow (255,255,0)
Brown (165,42,42)
Orange(255,165,0)
Red (255,0,0)
Dark Violet (138,43,266)
Purple (160,32,240)

Good luck,

Maxwell

Collapse -

Crystal Reports Question

by galahad04 In reply to Crystal Reports Question

Again thanks your helpful tips and suggestions! After playing around a little with the example you gave, I was able to figure out how to get it to work.

Collapse -

Crystal Reports Question

by galahad04 In reply to Crystal Reports Question

maxwell -- thanks very much for listing the helpful information in your reply...it is deeply appreciated.

However, the only problem that remains is how to create a looping statement (can this be done?) that would automatically make every other row (not column) the specified color. It would not be feasible for me to manually edit each field since there are ~2500 records, and there is not a common property for each field available that would let Crystal Reports to alternate the colors between each row.

Collapse -

Crystal Reports Question

by galahad04 In reply to Crystal Reports Question

maxwell -- actually no need to worry about my previous follow-up comment. I was able to figure out how to get the alternating color sequence using the RecordNumber property.

Collapse -

Crystal Reports Question

by galahad04 In reply to Crystal Reports Question

This question was closed by the author

Back to Software Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums