# Running total in Crystal Reports issue

I have a formula:
Local BooleanVar rate := CurrentDate - ({Commitment.Date)} < 730;
Local StringVar return := Cstr (If NumericText ({Irr_Data.Irr_Value}) then ToNumber ({Irr_Data.Irr_Value}));

If rate then "NM"
Else return

and the output is something like:
14.7
8.1
6.7
NM
8.7

I need to give a running total of the numbers.  How can I do that?
###### Who is Participating?

Commented:
Change the StringVar to NumberVar

Local BooleanVar rate := CurrentDate - ({Commitment.Date)} < 730;
Local NumberVar  return :=  (If NumericText ({Irr_Data.Irr_Value}) then ToNumber ({Irr_Data.Irr_Value}) Else 0);

If rate then  0 Else return

mlmcc
0

Commented:
Create another formula that returns a number

Local BooleanVar rate := CurrentDate - ({Commitment.Date)} < 730;
Local StringVar return :=  (If NumericText ({Irr_Data.Irr_Value}) then ToNumber ({Irr_Data.Irr_Value}) Else 0);

If rate then  0 Else return

mlmcc
0

Author Commented:
I am getting an error that a string is required here: (If NumericText ({Irr_Data.Irr_Value}) then ToNumber ({Irr_Data.Irr_Value}) Else 0);

and if the current date is less than two years from the commitment date, I have to display NM
0

Author Commented:
That worked.  Thank you!!
0

Commented:
how do i find minimum of a formula field in crystal reports
In crystal report ,I have three column  in  there is first and second column and the third column is  total of  first and second (a formula field) how i can find the minimum of the formula field
0

Commented:
Have you tried using minimum on the formula?

mlmcc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.