Forum guidelines
AuthorQuestion
how to calculate sum of formula field in crystal reports
Posted By ashrafuddin on 26 Jun 2010

Dear All,
I need help in calculating the sum of a formula filed in crystal report. I have a formula filed '@DebitAmount' ,I want to calculate the 'sum({DebitAmout}).
As its a formula it return an error.Can any one tell me how to just get total of '@DebitAmount'
With Regrads,
Ashrafuddin.T
 
 
 

AuthorReply
Re: how to calculate sum of formula field in crystal reports
Posted By Marimuthu Arigovindasamy on 27 Jun 2010   Accepted Answer
FormulaSection.zip
You can achieve this in 2 way
1. Right click the DebitAmount field from details section and click "Insert" and then "Summary".  Popup window open wiht Summary Location (Grand Total (DBField.DebitAmount)).
You can see the SUM field in Report footer section.
2. Drag and drop the DebitAmount field from Database field (as mentioned in screendump - have to mention the DB field name as note.Count)

Marimuthu A
Re: how to calculate sum of formula field in crystal reports
Posted By ashrafuddin on 29 Jun 2010  
prblem Formula1.zip
Dear Sir,
Thanks for your prompt reply.But I am unable to find the sum and my Formula field is taken as string.My problem can be better explain by the image attached with this . With Ref to image now i want sum(@FF_DebitAmount)
With Regards,
Ashrafuddin.T
 
 

Re: how to calculate sum of formula field in crystal reports
Posted By Marimuthu Arigovindasamy on 29 Jun 2010  

Create one more formula for the sum adn give like the below one.
sum({@FF_DebitAmount})

Marimuthu A
Re: how to calculate sum of formula field in crystal reports
Posted By ashrafuddin on 29 Jun 2010  

Thanks Dear for your support. I was able to find out my mistake. I have wrongly entered the data type in datatable of data set as "System.String" I corrected it to "System.Int32" and now I can see the "sum" in 'Calculate the Summary'. (I was generating crystal reports dynamically).
Once again thanks a lot.
With Regards,
Ashrafuddin.T

SPONSORED BY

Custom Software Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.