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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Hot to Cold" background color on Clients ranked by Profit Margin

Status
Not open for further replies.

adriae

Technical User
Oct 7, 2011
16
0
0
US
Hello,

I'm using Crystal 2011 and have a report that ranks our Clients based on their monthly profit margin percentage.

The "Top N" group sort option allows me to sort the report correctly (highest percentage down to lowest), but I'd also like to set the background color of the cell containing the client's profit margin to a color depending on where they are in the profit margin ranking.

For example, clients with the highest profit margin percentage would have a "hot" background color such as red, and then it would gradually fade into orange, yellow, etc the further down the ranking list indicating clients with the smaller profit margin percentages.

I know I can set up a formula with set colors assigned to different groupings of values but I didn't know if there is an easier way to accomplish this sort of "gradient" coloring based on a ranking. I think someone was able to do this in an excel spreadsheet, and asked if I could do the same in Crystal.

Any help is appreciated. Thanks!!
 
Use the RGB (red, green, blue) function in the expression controlling the background color. This gives you full control over each of the color components. In your case, you will probably focus on varying the RED component.

hth,
- Ido

view, export, burst, email, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top