2016-01-22 44 views
0

是否有这样一个公式:Crystal报表合并重复的列相同的数据

 
mainId productId groupId product  price  qty 
456   123  555   book   10   2 
456   789  555   book   10   2 
222   125  888   pencil  20   5   
222   125  859   pencil  20   1 

它显示了(从子报告主报告):

 
product: book 
Computation: 10x2  20 

product: book 
Computation: 10x2  20 

Total     40 

我想要的结果是这样的如果产生的数据与上面的数据相同:

 
product: book 
Computation: 10x4  40 

Total     40 

如果不是像mainId 222一样的数据结果T应当是这样的:

 
product: pencil 
Computation: 20x5  100 

product: pencil 
Computation: 20x1  20 

Total    120 

在子报告I组它,按ProductID

Group Header: [Group#1 Name] 
Details: 
Group Footer: [product] 
Computation: [computation (10x2)] [total (20)] 

在主报告中,我组它,按ProductID了。我将组报告中的子报表分组。在页面页脚是总共有20个。

回答

0

看起来像你应该组GroupID而不是productid?