简体   繁体   English

如何解决Crystal Report公式编辑器中的错误

[英]How to solve the error in Crystal report Formula Editor

    totext(count({Emp.Name},{Sal.Name}),"#,###")+" "+if count ({Emp.Name},
{Sal.Name})<>1 then {Sal.Name} + " Accounts" else

    {Sal.Name}+" Account"

There must be a group that matches this field. 必须有一个与此字段匹配的组。 Error in Formula Group count. 公式组计数错误。

Above report query - Emp.Name and Sal.Name fields datatypes are varchar . 上面的报表查询-Emp.Name和Sal.Name字段的数据类型为varchar Values are loaded correctly in print preview. 值已正确加载到打印预览中。 But error throw on runtime . 但是错误引发了运行时

Please help this issue. 请帮助解决这个问题。 Thanks for Advance..! 感谢前进。

This line of code count({Emp.Name},{Sal.Name}) means you are trying to count the employee name with respect to the sal.name group, hence this error. 这行代码count({Emp.Name},{Sal.Name})表示您正在尝试相对于sal.name组计算员工姓名,因此会出现此错误。

Go to Insert --> group --> In window select sal.name which will create a group for you. 转到Insert --> group --> In window select sal.name ,它将为您创建一个组。

once group is created then check the formula 建立群组后,请检查公式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM