vinkumar

I am using .net 2005.

I am using the Formula Field for calculating the sum of a database field called "Amount" in crystal report.

It is the integer field.

I am using the formula as
"Sum({Details.Amount})"

While viewing the report it is giving the error message as
"Number or Currency field is required" and it is not giving the Sum of that field.

If is use other things Like "Maximum({Details.Amount})" it is working fine.

What is the solution for that




Re: Crystal Reports for Visual Studio Problem in calculating the sum of a field in Crystal Report in .net

Ting Wang - MSFT

I am moving this thread from the WinForm forum to the Crystal Reports forum. I believe there are more Crystal Reports experts here.




Re: Crystal Reports for Visual Studio Problem in calculating the sum of a field in Crystal Report in .net

shippers625

Hi, I hope this can Help...

First make a Formula field ( sample: valueAmount )

Then set the formula to : val({Details.Amount})

and Save it.

Then Make another Formula field and set the formula to : sum({@valueAmount}) then save....





Re: Crystal Reports for Visual Studio Problem in calculating the sum of a field in Crystal Report in .net

captJackSparrow

Most probably your field is type String, it may be type integer in Database but its getting converted to string when you use in CR.Solution is inside formula where you calculate SUM{convert field to integer}