2013-05-01 18 views
1

我有一個數據集,如下面的一個:iReport的組的結果在不同的類別

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 

即,很多用量和duedates行的,具有一定的資助者和產品區分類似duedates

我需要的是通過創始人/產品創建報告分組,以便某些創始人/產品的所有管理員都會一起出現,然後爲所有屬於他們的管理員創建下一個創建者/產品等。

這樣的如下:

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的獲得是通過方正/組組,並重復各組不同duedates,代替各組中的所有duedates分組在一起。因爲這樣:

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 

有沒有辦法實現這一點? 顯然,一切都只是發明的數據,行爲就是我正在尋找的...

+0

你有兩組試過嗎?第一個由Fund分組,第二個分組由Prod。我認爲你應該可以這樣做 – drewich 2013-05-01 21:51:04

+0

是的,我已經嘗試過兩組。但似乎iReport中的分組只是爲了顯示幾個塊中的細節,一個細節適用於組,並重復和重複,而不是通過定義組的標準來真正分組細節。我仍然想知道是否有辦法實現它,它應該... – 2013-05-01 22:01:53

回答

1

好的,我明白了。

問題出在我的查詢上,而不是報表上。

我在SQL查詢中通過duedate命令完成了所有操作,並使jasper生成結果,如我所示。

刪除該排序條件解決了問題。