【问题标题】:Crystal Reports - Grouping of output recordsCrystal Reports - 输出记录分组
【发布时间】:2009-09-28 12:35:49
【问题描述】:

我在 Oracle 中有一个存储过程,它将返回以下内容 下面给出的 5 列排序方式 (ORDER BY) 日期、帐户、资产、金额和类型。

在 Crystal Reports 中,我对过程返回的输出进行了分组 基于日期、帐户和资产列。

水晶报表的输出如下。

Date  Account  Asset  Amount  Type

Date1 Account1 Asset1 Amount1 Buy
Date1 Account1 Asset1 Amount1 Sell
Date1 Account1 Asset1 Amount2 Buy
Date1 Account1 Asset1 Amount2 Sell

Date2 Account2 Asset2 Amount3 Buy
Date2 Account2 Asset2 Amount4 Sell
Date2 Account2 Asset2 Amount5 Sell

Date3 Account3 Asset3 Amount6 Buy
Date3 Account3 Asset3 Amount6 Sell

Date4 Account4 Asset4 Amount7 Buy
Date4 Account4 Asset4 Amount7 Buy
Date4 Account4 Asset4 Amount8 Sell

问题:水晶中是否有任何可能的方式来分离第一个 基于仅分组日期列金额的结果组如下, 帐户和资产,使其不会影响另一组输出。 (或)

Date  Account  Asset  Amount  Type

Date1 Account1 Asset1 Amount1 Buy
Date1 Account1 Asset1 Amount1 Sell

Date1 Account1 Asset1 Amount2 Buy
Date1 Account1 Asset1 Amount2 Sell

Date2 Account2 Asset2 Amount3 Buy
Date2 Account2 Asset2 Amount4 Sell
Date2 Account2 Asset2 Amount5 Sell

Date3 Account3 Asset3 Amount6 Buy
Date3 Account3 Asset3 Amount6 Sell

Date4 Account4 Asset4 Amount7 Buy
Date4 Account4 Asset4 Amount7 Buy
Date4 Account4 Asset4 Amount8 Sell

【问题讨论】:

  • 这个问题需要一个比“水晶报告”更好的标题

标签: crystal-reports


【解决方案1】:

除非我遗漏了一些东西,否则您似乎只需要从以下位置更改分组顺序:

日期、账户、资产、金额、类型

到:

日期、帐户、资产、类型、金额

所以答案是按金额和类型添加一个组,因为您说它已经按日期、帐户和资产分组。

希望这会有所帮助。

【讨论】:

    【解决方案2】:

    如果我是你,我会将分组条件设为一个公式,该公式具有你的正常逻辑和一个 OR 来检查你的特殊逻辑

    【讨论】:

      【解决方案3】:

      使用子组可能是您想要的。我们的应用程序使用 Crystal 来生成语句,并且我们有几个分组,因此我们可以在不同的级别进行分离和汇总:

      • 第 1 组是客户(用于运行批次)。
      • 第 2 组是有争议的状态(因此有争议的费用或不良付款单独列出)。
      • 第 3 组是交易(费用和付款)。
      • 第 4 组是个人购买或退款的订单项。

      我们使用分组摘要列出每个销售下的小计和每个客户的总余额。

      如果您为日期、帐户和资产使用一个组,请尝试添加一个新组(菜单插入 --> 组)并选择金额作为分组依据。水晶保持细节部分完整。然后,您可以在每个 Amount 组的末尾添加额外的空间,或者根据需要插入组小计(右键单击一个字段并从弹出窗口中选择 Insert --> Summary )。 Crystal 允许至少五个分组级别。

      【讨论】:

        猜你喜欢
        • 2010-09-25
        • 1970-01-01
        • 2014-05-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-08-23
        相关资源
        最近更新 更多