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................
Marked as answer by rkreddy2010.g on Sep 14, 2012 10:04 AM
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...
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 .
rkreddy2010....
Member
5 Points
28 Posts
How to find the sum of a column in crystal reports
Jul 27, 2012 02:38 PM|LINK
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................
jaya kumar
Member
367 Points
103 Posts
Re: How to find the sum of a column in crystal reports
Jul 27, 2012 07:04 PM|LINK
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
rkreddy2010....
Member
5 Points
28 Posts
Re: How to find the sum of a column in crystal reports
Jul 28, 2012 06:36 AM|LINK
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...
rushelp
Member
51 Points
134 Posts
Re: How to find the sum of a column in crystal reports
Jul 31, 2012 02:43 AM|LINK
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.
Ajay2707
Contributor
4487 Points
870 Posts
Re: How to find the sum of a column in crystal reports
Aug 02, 2012 01:06 PM|LINK
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;