# 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?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

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