Crystal Reports 中的条件组 SUM [英] Conditional group SUM in Crystal Reports
问题描述
我一直在做一些会计报告,并一直在用公式总结我的不同货币
I've been doing some accounting reports and have been summing up my different currencies using a formula
IE
加拿大委员会公式
if {myData;1.CurrencyType} = "CDN" then
{myData;1.Commission}
else
0
加拿大佣金总和
SUM({@CanadianCommissionFormula})
然后我只需在报告底部显示 CanadianCommissionSum,一切都很好.
Then I'd just display the CanadianCommissionSum at the bottom of the report and things were great.
我刚刚遇到了执行此操作的要求,但按销售代表分组.我尝试使用以前的公式,但这是整个报告的总和.有没有一种简单的方法可以根据它所在的组进行这样的总结?
I've just come across the requirement to do this, but grouped by Sales Rep. I tried using my previous formula, but this sums for the whole report. Is there an easy way to sum like this, based on which group it's in?
推荐答案
你可能在一年前就想到了这个,但以防万一,试试这个:
You probably figured this out a year ago, but just in case, try this:
将 CanadianCommissionSum 公式更改为
Change your CanadianCommissionSum formula to
SUM({@CanadianCommissionFormula},{SalesRep})
将此公式放入您的销售代表的组页脚部分.
Put this formula in your SalesRep's Group Footer section.
现在应该可以正常显示了.
This should now display properly.
这篇关于Crystal Reports 中的条件组 SUM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!