# How to find the sum of a column in crystal reports RSS

## 4 replies

Last post Aug 02, 2012 01:06 PM by Ajay2707

Member

5 Points

28 Posts

### How to find the sum of a column in crystal reports

in my crystal report i want to find the sum of a column.for that first i need to check whether the column is numeric or not.if it is numeric then it has to find the sum of column otherwise just leave it.
this is my requirement ant body help me for this................

Member

367 Points

103 Posts

### Re: How to find the sum of a column in crystal reports

In crystal reprots for summing the column  need to user running total

pls refer

http://forums.asp.net/t/1452225.aspx/1

http://stackoverflow.com/questions/2891153/how-to-get-the-sum-of-the-column-in-crystal-reports

http://stackoverflow.com/questions/9325439/crystal-report-multicolumn-running-total

Member

5 Points

28 Posts

### Re: How to find the sum of a column in crystal reports

but first i want to check whether the column is string or not then if it is number then display the sum otherwise nothing to display.how to check whther  the column is string or not...

Member

51 Points

134 Posts

### Re: How to find the sum of a column in crystal reports

You need to write  a formula.  This function will return true or false:

`IsNumeric({field})`

So you would check, if it's true then do your calculation, if NOT do something else.

• Edited by rushelp on Jul 31, 2012 02:47 AM
• Edited by rushelp on Jul 31, 2012 02:47 AM

Contributor

4487 Points

870 Posts

### Re: How to find the sum of a column in crystal reports

Hi Rk Reddy,

For this take one variable and place last column, if you want to hide , then you may hide it also, but it needed in same location where you want to add.

Now in this variable , do coding like.

```Local NumberVar Result;
Result := 0;
If IsNumeric({MycolumnName1}) then
Result = Result + {MycolumnName1};
If IsNumeric({MycolumnName2}) then
Result = Result + {MycolumnName};
If IsNumeric({MycolumnName3}) then
Result = Result + {MycolumnName3};
.
.
.

return Result;```
`Now if you want to it summary then right click and summary it on group footer .`