Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

I have taken a data set with schema to import data into crystal report.

In a field, I want to take some of that field and use formula field sum function.
But for that field I get the error "A number field or Currency Amount Field is required here".

Please help for providing the Solution.

Thanks in Advance
Nilesh
Posted
Updated 2-Dec-10 21:53pm
v2
Comments
Dalek Dave 3-Dec-10 3:53am    
Edited for Grammar, Spelling and Readability.

Try splitting it into two formula fields:
Make one formula called "Price" with the following code:
CCur ({Table.Field})
Then create a new formula to create your sum, thusly:
Sum({@Price})

The Crystal function SUM gets confused when you try to pass functions to it, so just try passing it the final, numerical value you want to summarize.

You can also use the INSERT|SUMMARY command from the top level menu.
 
Share this answer
 
Before sum convert the field as numeric like below
ToNumber({Table.Field))

so your total formula should be like
SUM(ToNumber({Table.Field)))
 
Share this answer
 
Comments
Dalek Dave 3-Dec-10 3:54am    
Good Call.
Nihar Kulkarni 3-Oct-12 2:45am    
Its gives error "Field is required here"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900