Crystalyzer
Technical User
- Mar 28, 2003
- 218
Hi All,
I have a problem with fields that have null values in some of my formulas. What is happening is that if one field in the formula is null the result of the formula is blank (ie the field containing the formula and any formulas dependend on it are gone from the displayed report) The formula and my attempts to trap null values are as follows:
Thanks in advance for any advice/help you can offer.
Thanks and best regards,
-Lloyd
I have a problem with fields that have null values in some of my formulas. What is happening is that if one field in the formula is null the result of the formula is blank (ie the field containing the formula and any formulas dependend on it are gone from the displayed report) The formula and my attempts to trap null values are as follows:
Code:
//DECLARE VARIABLES
numbervar IntWO;
numbervar DeemedGain;
numbervar PrPerCLR;
numbervar TotGL;
numbervar CLRpct;
//CHECK ENTITY AND RETURN CLR %
Select {Activity.Legal Entity}
Case "Bessemer Venture Associates LLC":
CLRpct := .2
Case "Bessemer Venture Associates V LLC":
CLRpct := .3
Case "BVP IV Special Situations L.P.", "BVP III Special Situations L.P.":
CLRpct := .2/.99
Default :
0;
//CHECK FOR NULL VALUES IN FIELDS AND MAKE THEM ZERO
IIF(ISNULL({#Interest Rec WO}),IntWO := 0,IntWO := {#Interest Rec WO});
IIF(ISNULL({#Deemed Gains}),DeemedGain := 0,DeemedGain := {#Deemed Gains});
IIF(ISNULL({Prior_Period_CLR.Contingent Loss Reservers}),PrPerCLR := 0,PrPerCLR := {Prior_Period_CLR.Contingent Loss Reservers});
IIF(ISNULL(Sum({@Total Gain/(Loss)},{Activity.Legal Entity})),TotGL := 0,TotGL := Sum({@Total Gain/(Loss)},{Activity.Legal Entity}));
//FORMULA
IF PrPerCLR <=0 THEN
IF (TotGL)<=0 THEN
ROUND((TotGL - IntWO - DeemedGain) * CLRpct, 2)
Else
IF ((TotGL) * -CLRpct) > PrPerCLR THEN
Round((TotGL - IntWO - DeemedGain) * CLRpct,2)
Else
PrPerCLR*-1
ELSE
0;
Thanks in advance for any advice/help you can offer.
Thanks and best regards,
-Lloyd