Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Change colour of formula field in Crosstab report Post Reply Post New Topic
Author Message
nlcdcg
Newbie
Newbie


Joined: 24 Nov 2011
Online Status: Offline
Posts: 10
Quote nlcdcg Replybullet Topic: Change colour of formula field in Crosstab report
    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 (({@size} / previous ({@size}))*100)<90  then GREEN
  
else BLACK
 
but this is not working....
 
Any help gratefully received.  Many thanks.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.