Crystal Reports中的条件组SUM [英] Conditional group SUM in Crystal Reports

查看:624
本文介绍了Crystal Reports中的条件组SUM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用一些会计报告,并使用公式对不同的货币进行汇总。

I've been doing some accounting reports and have been summing up my different currencies using a formula

IE

CanadianCommissionFormula

if {myData;1.CurrencyType} = "CDN" then
    {myData;1.Commission} 
else
    0



CanadianCommissionSum

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:


  1. 将CanadianCommissionSum公式更改为

  1. Change your CanadianCommissionSum formula to

SUM({@ CanadianCommissionFormula},{SalesRep})

您的SalesRep的群组页脚部分。

Put this formula in your SalesRep's Group Footer section.

这应该会正常显示。

这篇关于Crystal Reports中的条件组SUM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆