Crystal Reports中的条件求和 [英] Conditional summation in Crystal Reports
本文介绍了Crystal Reports中的条件求和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一些包含价格和数量的行,我希望仅对数量> 5的价格求和。
I have some rows with a price and quantity and I'm looking to sum only the prices where the quantity > 5
itemname price Qty
----------------------------------
apple 20 2
watermelon 10 3
bango 22 6
hashesh 3 9
吉文以上数据,我想得到的总和是22 + 3 = 25。如何编写公式来做到这一点?
Given the above data, the sum I'd like to get is 22+3=25. How do I write a formula to do this?
推荐答案
创建一个名为 calculation $的公式字段c $ c>到数量旁边,并输入以下文本:
create a formula field named calculation
to the side of quantity and enter the following text:
// {@calculation}
If quantity>5 then price
else 0
现在取 {@ calculation}
。
将总和并放在必填列的页脚中。
Take the sum and place in the footer of the required column.
这篇关于Crystal Reports中的条件求和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文