外部组页脚的嵌套组的SSRS摘要

时间:2013-11-18 17:18:56

标签: reporting-services

我有一个像这样的报告, 它有嵌套组,外部组在业务伙伴上,内部组在货币代码上。

Busines Partner1
    Opening Balance for USD as of 2013-10-01
        Transaction 1..
        Transaction n..
        USD Totals
    Balance for EUR as of 2013-10-01
        Transaction 1..
        Transaction n..
        EUR Totals

Busines Partner2
    Opening Balance for USD as of 2013-10-01
        Transaction 1..
        Transaction n..
        USD Totals
    Balance for EUR as of 2013-10-01
        Transaction 1..
        Transaction n..
        EUR Totals

我需要的是业务合作伙伴组页脚,我想显示每种货币代码的总体未结余额。喜欢的东西;

Busines Partner1
    Opening Balance for USD as of 2013-10-01
        Transaction 1..
        Transaction n..
        USD Totals
    Balance for EUR as of 2013-10-01
        Transaction 1..
        Transaction n..
        EUR Totals

    (Assume below section is Business Partner1 Group Footer)
    Currency, Opening Balance, Sum of In Period, Overall
         USD           200.00            300.00     500
         EUR           150.00            400.00     550
         Total                                     1050

Busines Partner2
    Opening Balance for USD as of 2013-10-01
        Transaction 1..
        Transaction n..
        USD Totals
    Balance for EUR as of 2013-10-01
        Transaction 1..
        Transaction n..
        EUR Totals

    (Assume below section is Business Partner2 Group Footer)
    Currency, Opening Balance, Sum of In Period, Overall
         USD           100.00            300.00     400
         EUR           250.00            300.00     550
         Total                                      950

问题是我如何实现这个目标?

  • 我从SP提取数据,并在给定日期持有期初余额。
  • 预先不知道货币数量。
  • 并且报告有2个组,外部组在Biz.PartnerId内部,一个是货币 码。
  • SSRS 2008 R2(如果是这样,我可以升级到最新版本和最高版本 需要考虑的问题。)

1 个答案:

答案 0 :(得分:1)

我认为你必须正确地组织你的团体..

基于以下示例数据:

SELECT 'BusinessPartner1' BusinessPartner, 'EUR' CurrencyType, 100 Amount, 122 TotalSpend UNION
SELECT 'BusinessPartner1' BusinessPartner, 'GBP' CurrencyType, 111 Amount, 301 TotalSpend UNION
SELECT 'BusinessPartner2' BusinessPartner, 'EUR' CurrencyType, 81 Amount, 191 TotalSpend UNION
SELECT 'BusinessPartner2' BusinessPartner, 'GBP' CurrencyType, 13 Amount, 93 TotalSpend UNION
SELECT 'BusinessPartner2' BusinessPartner, 'USD' CurrencyType, 30 Amount, 32 TotalSpend UNION
SELECT 'BusinessPartner3' BusinessPartner, 'GBP' CurrencyType, 78 Amount, 42 TotalSpend UNION
SELECT 'BusinessPartner3' BusinessPartner, 'USD' CurrencyType, 210 Amount, 61 TotalSpend UNION
SELECT 'BusinessPartner3' BusinessPartner, 'EUR' CurrencyType, 12 Amount, 71 TotalSpend

如果您按照这样的方式构建您的群组(1个父亲,1个孩子,1个与孩子相邻):

Grouping example 1

然后你得到以下输出,我认为这是你所追求的那种东西。为了得到您需要的内容,我认为您还需要在每个相邻组中使用详细信息子组

Grouping example 2