简体   繁体   English

水晶报表获取总和错误

[英]Crystal Report get sum error

I watched video tutorial about Crystal Reports. 我看了有关Crystal Reports的视频教程。 I am confused because when I click Insert > Summary the Sum , Average and etc. are not on the list of Calculate this summary 我很困惑,因为当我单击“ 插入” >“ 摘要”时 ,“ Sum ,“ Average等不在“ Calculate this summary ”列表中
这是屏幕截图
I tried to search web but no luck. 我试图搜索网络,但没有运气。 Please help me fixing this. 请帮我解决这个问题。

That would be because Crystal sees this field as a STRING and can't sum a string. 那是因为Crystal将此字段视为STRING,并且无法求和字符串。 You can write a formula field that will convert a string to a numeric and then do a summary of the formula: 您可以编写一个公式字段,该字段会将字符串转换为数字,然后对公式进行汇总:

Val ({YourTable.total}) 值({YourTable.total})

@Icebergman_NewProgrammer, Your Sum field is a nvarcha/nchar or others. @Icebergman_NewProgrammer,您的Sum字段是nvarcha / nchar或其他。

plz check this and insure this int/decimal/numeric etc. 请检查并确保此整数/小数/数字等。

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

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