There are three basic ways to approach this.
If you have no need to see the detail data in the report, or can use the drilldown function to view the detail data, then you can do this very simply with grouping. Simply group on the item code field, put in your desired summaries, and suppress the details section. (However, I note that you seem to want to group the data two different ways, by category and by item code, so this approach may not be entirely feasible.)
The second approach is to use a cross-tab. I realize that this doesn't look like a cross-tab, because you aren't trying to change the orientation of the data. But, trust me, this can work. Create a cross-tab using the expert. Along the side, put your item code. In the summaries section, put the three price summaries. Select your total options to get the output formatted in the way you want.
The third approach is to use conditional formulas. Now, this only works if you know ahead of time that the range of possible values for the item code is limited and fairly static. Create a formula for each item code (this is why you need to know all the possible codes ahead of time). The formula should look like: IF {ItemCode} = "XXX" THEN price1 ELSE 0 In the report footer, you can summarize based on this formula, and it will give you the results you are looking for.
|