|
I have a crystal reports report.
And now I want to make some formulas to format de rows under different conditions.
Formula 1:If IsNull({PmJob.PmjId}) Then 1 else 0
Formula 2:If IsNull (LastPO) then 8 else
If (LastPO) < (today- (1 year + 1month) then 4 else
If (LastPO) < 1 January of this year then 2 else 0
For example: today = 10 November 2010
Today – (1 year + 1 month ) = 1 October 2010
LastPO is a link of a subreport.
If LastPO is empty then 8
If LastPO = 28-09-2009 then 4
If Last PO = 15-12-2009 then 2
Is LastPO = 03-04-2010 then 0
Formula 3:If {Equipment.EqmInstDate} < (today - (1 year ) then 16 else 0
For example: If {Equipment.EqmInstDate} < (1 November 2009 ) then 16 else 0
Fomula 4: If {Equipment._EqmGeenPoNodig} = 1 Then 32 else 0
Formula 5: If {@Protocol} = “nee” then 64 else 0
The conditional background format of the rows is then:
Sum (formulas 1, 2, 3, 4 and 5) =
White : 32, 33,34,35, 36, 37, 40, 41, 49 , 57, 96, 98, 104, 112, 120
Yellow: 9
Green: 0, 1, 16, 17, 24, 25, 64, 80, 88
Orange: 2, 3, 8, 18, 66, 72
Red: 4, 5, 20, 68
How Do I make this work?
|