Crystal Report Sum of a Column data

不羁岁月 提交于 2019-12-07 08:17:03

问题


I have field GrandTotal in my dataset which I am showing in my report. I want show the total of all data in the footer .

My column data are string .

I tried to make a formula as bellow

 SUM(ToNumber({Ds.Grandtotal}))

But its saying a field is require.


回答1:


You must convert the field into number, and then try to get the sum.

Step 1: Create a new formula from field explorer, give a name to formula (relevant name).

Step 2: Convert the field into Number.

Step 3: Then Add Sum of the formula field

Step 4: Place that Formula field into the Report Footer.

Add Formula:

Choose Field to Convert into Number or Currency:

Then After Field Conversion, get the Sum of the Formula field by choosing name of the formula from the Report fields. Formula field has fx as prefix.




回答2:


Try below solution.

  1. Create a formula and write formula as

ToNumber({Ds.Grandtotal}) now place this formula in details section.

  1. Now write on the placed formula and click on summary and insert summary to grand total.


来源:https://stackoverflow.com/questions/19082880/crystal-report-sum-of-a-column-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!