Crystal Report SUM 函数与 CASE

编程入门 行业动态 更新时间:2024-10-11 01:11:43
本文介绍了Crystal Report SUM 函数与 CASE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的水晶报表中有以下列值:

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) |

我想总结除具有代码 H、J、K 和 L 的单元之外的单元.代码:H、J、K 和 L 包含带括号的单位.有没有办法做到这一点?

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})

这将返回 0 用于非数字文本和数字创建这些数字的总和,你会得到你想要的

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})

使用总和

如果您想要 NewPriceAD 的总和,请在管理字段中使用它

If you want sum of NewPriceAD then use it in mentained field

更多推荐

Crystal Report SUM 函数与 CASE

本文发布于:2023-10-18 15:18:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1504610.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:函数   Report   Crystal   CASE   SUM

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!