Crystal Reports求和函数 [英] Crystal Reports Sum Function

查看:151
本文介绍了Crystal Reports求和函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已将一个具有模式的数据集导入到Crystal报表中.

在一个字段中,我想使用其中的一些字段并使用公式字段求和函数.
但是对于该字段,我收到错误消息此处需要数字字段或货币金额字段".

请帮助提供解决方案.

在此先感谢
Nilesh

Hi,

I have taken a data set with schema to import data into crystal report.

In a field, I want to take some of that field and use formula field sum function.
But for that field I get the error "A number field or Currency Amount Field is required here".

Please help for providing the Solution.

Thanks in Advance
Nilesh

推荐答案

尝试将其拆分为两个公式字段:
使用以下代码创建一个名为价格"的公式:
CCur({Table.Field})
然后创建一个新公式来创建您的总和,从而:
总和({@Price})

当您尝试将函数传递给Crystal函数SUM时,会感到困惑,因此只需尝试将最终要汇总的数值传递给它即可.

您还可以从顶层菜单使用INSERT | SUMMARY命令.
Try splitting it into two formula fields:
Make one formula called "Price" with the following code:
CCur ({Table.Field})
Then create a new formula to create your sum, thusly:
Sum({@Price})

The Crystal function SUM gets confused when you try to pass functions to it, so just try passing it the final, numerical value you want to summarize.

You can also use the INSERT|SUMMARY command from the top level menu.


求和之前,将字段转换为数字,如下所示
Before sum convert the field as numeric like below
ToNumber({Table.Field))


所以你的总公式应该像


so your total formula should be like

SUM(ToNumber({Table.Field)))


这篇关于Crystal Reports求和函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆