Crystal报表SUM函数与CASE [英] Crystal Report SUM function with CASE
问题描述
我在Crystal报表中有以下列值:
| Code | Unit |
| A | 2 |
| B | 3 |
| C | 2 |
| D | 3 |
| E | 1 |
| F | 1 |
| G | 4 |
| H |(3)|
我想总结单位,除了具有代码H,J,K和L的单位。
代码:H,J,K和L包含带括号的单元。
有办法吗?
如果你想省略只需将此字段转换为数字
使用
Val({Unit})
这将返回0非数字文本和数字的数字创建总和这些你会得到你想要的
如果您不想使用任何特殊的,请创建如下
的公式字段: if {fa_rep_vr_Main。 CustomTitle}不在('A','B','C')然后
0
else
val({Unit})
使用此
的总和如果您想要NewPriceAD的总和, p>
I have the following column values in my crystal report:
|Code |Unit |
|A |2 |
|B |3 |
|C |2 |
|D |3 |
|E |1 |
|F |1 |
|G |4 |
|H |(3) |
I want to summarize the Unit except the Units which has Code H,J,K, and L. The Codes: H,J,K, and L contains units which has parenthesis. Is there a way to do this?
If you want to omit only units with ‘(‘ in it just convert this filed to number Use
Val ({Unit})
this will return 0 for non-numeric text and number for numeric create sum of these you will get what you want
If you want not to use any special then create formula field like this
if {fa_rep_vr_Main.CustomTitle} not in('A','B','C') then
0
else
val({Unit})
use sum of this
If you want sum of NewPriceAD then use it in mentained field
这篇关于Crystal报表SUM函数与CASE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!