Print Page | Close Window

Change colour of formula field in Crosstab report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=15667
Printed Date: 03 May 2024 at 11:26am


Topic: Change colour of formula field in Crosstab report
Posted By: nlcdcg
Subject: Change colour of formula field in Crosstab report
Date Posted: 18 Feb 2012 at 7:44am
Hi,
I am displaying numerical values in a cross tab.  eg.
 
1/2/12   2/2/12  3/2/12 and so on
26             52        54
11               12      8
 
The values are a formula field @size which sums the value of {emm_image.fragementsize} and divides by 1024.
 
 I want the colour to change to red if the value compared to the previous column goes up by more than 10%, green if it goes down more than 10% and stay black if it is within 10% of the previous number.
 
So in the example above 26 would be black 52 would be red and 54 would be black.
 
Line 2 - 11 would be black, 12 would be black and 8 would be green.
 
I can find where to write a formula for the font colour - Right click on field, format field, font, and then the formula button next to Colour, but I am stuck on the formula.
 
I have got as far as:
if (( mailto:%7b@size - {@size } / previous ( mailto:%7b@size%7d%29%29*100%29%3c90 - {@size}))*100)<90   then GREEN
  
else BLACK
 
but this is not working....
 
Any help gratefully received.  Many thanks.



Print Page | Close Window