问题
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