【问题标题】:iReport Group results in different categoriesiReport Group 结果分为不同的类别
【发布时间】:2013-05-01 21:28:33
【问题描述】:

我有一个如下数据集:

Funder   Product    DueDate      Amount
=======================================
Fund1    Prod1      01/oct/2013  $1,500
Fund2    Prod1      01/oct/2013  $1,000
Fund3    Prod1      01/oct/2013  $850
Fund1    Prod2      01/oct/2013  $2,000
Fund2    Prod2      01/oct/2013  $750
Fund1    Prod1      02/oct/2013  $1,500
|        |          |            |
Fund3    Prod2      31/oct/2013  $750

也就是说,很多行都有金额和截止日期,某些资助者和产品会区分相似的截止日期

我需要的是生成一个按创始人/产品分组的报告,使某个创始人/产品的所有到期日期一起出现,然后为下一个创始人/产品所有属于他们的到期日期,等等。

比如这样:

Fund1
Prod1
DueDate     Amount
==================
01/oct/2013 $1,500
02/oct/2013 $1,500
03/oct/2013 $2,000
|           |
31/oct/2013 $1,750

Prod2
DueDate     Amount
==================
01/oct/2013 $2,000
02/oct/2013 $1,500
03/oct/2013 $2,000
|           |
31/oct/2013 $1,750


Fund2
Prod1
DueDate     Amount
==================
01/oct/2013 $1,000
02/oct/2013 $1,500
03/oct/2013 $2,000
|           |
31/oct/2013 $1,750

Prod2    
DueDate     Amount
==================
01/oct/2013 $750
02/oct/2013 $1,500
03/oct/2013 $2,000
|           |
31/oct/2013 $1,750


Fund3
Prod1    
DueDate     Amount
==================
01/oct/2013 $850
02/oct/2013 $1,500
03/oct/2013 $2,000
|           |
31/oct/2013 $1,750

Prod2
DueDate     Amount
==================
02/oct/2013 $1,500
03/oct/2013 $2,000
|           |
31/oct/2013 $750

到目前为止,我可以使用 iReport 进行分组,并按 Founder / Group 分组并针对不同的截止日期重复每个组,而不是将每个组中的所有截止日期分组在一起。像这样:

Fund1
Prod1

    DueDate     Amount
    ==================
    01/oct/2013 $850

Fund1
Prod2

    DueDate     Amount
    ==================
    01/oct/2013 $850

Fund2
Prod1

    DueDate     Amount
    ==================
    01/oct/2013 $850

Fund2
Prod2

    DueDate     Amount
    ==================
    01/oct/2013 $850

Fund3
Prod1

    DueDate     Amount
    ==================
    01/oct/2013 $850

Fund1
Prod1

    DueDate     Amount
    ==================
    02/oct/2013 $850

|
etc

有没有办法做到这一点? 显然,一切都只是虚构的数据,行为正是我要寻找的......

【问题讨论】:

  • 你试过两个组吗?第一个按基金分组,第二个按产品分组。我认为您应该能够这样做
  • 是的,我尝试了两组。但似乎iReport中的分组只是将细节显示在几个块中,一个细节用于分组并重复和重复,而不是真正按照定义组的标准对细节进行分组。我仍然想知道是否有办法实现它,它应该......

标签: jasper-reports reporting ireport


【解决方案1】:

好的,我知道了。

问题出在我的查询上,而不是在报告上。

我在 SQL 查询中按截止日期对所有内容进行排序,这使得 jasper 生成了我所展示的结果。

删除该排序标准解决了问题。

【讨论】:

    猜你喜欢
    • 2019-07-27
    • 1970-01-01
    • 2017-04-19
    • 2015-05-11
    • 2020-02-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多