Crystal reports merge duplicate columns same data

不想你离开。 提交于 2019-12-12 04:17:36

问题


Is there a formula for this:

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

it shows (from sub report to main report):

product: book
Computation: 10x2     20

product: book
Computation: 10x2     20

Total                 40

I want the result to be like this if data produce are the same like the one above:

product: book
Computation: 10x4     40

Total                 40

if not the same data like with the mainId 222 the result should be like this:

product: pencil
Computation: 20x5     100

product: pencil
Computation: 20x1     20

Total                120

In sub report I group it by productId

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

In main report I group it by productId too. I group the Subreport in Group Header. In the Page Footer is the Grand Total which is 20.


回答1:


looks like you should group on GroupID rather than productid?



来源:https://stackoverflow.com/questions/34939108/crystal-reports-merge-duplicate-columns-same-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!