开发者

Addition of string fields in Crystal Reports

开发者 https://www.devze.com 2023-02-02 19:22 出处:网络
I have a column name Amount whose valu开发者_运维百科es are sometimes like 400(300) and hence the data type is string in Crystal report.

I have a column name Amount whose valu开发者_运维百科es are sometimes like 400(300) and hence the data type is string in Crystal report.

Now i wish to do summation of Amount Column.How to do that?

the Sum(FieldName) forumla does not work because it is string. I, no way can convert it into numeric..

Let me know if any inputs required.

Thanks..


Create a new formula in your report like so:

if (IsNull({Testing.Amount}) or not IsNumeric({Testing.Amount}) or {Testing.Amount} = "")
Then 0 
Else
ToNumber({Testing.Amount})

And display the formula on the report.


Late But as i was stuck at this, so

  • Create A New Formula Field (lets say name is 'abc')
  • Convert your string column to number in this field like so (ToNumber({tablename.yourfield})
  • Then create a new Running Total. In this field Select Sum(abc) and place this Running total where you want.
0

精彩评论

暂无评论...
验证码 换一张
取 消