Here is what I did to model what I thought was the problem described:
Using the Xtreme Sample Database that comes with Crystal, I created a report that includes the following tables (and using the Smart Linking to get the joins):
Customer
Orders
Orders_Detail
Product
Your problem resembles a scenario where you want to see a Customer and the products they've ordered. Obviously, multiple customers can order the same product. So, I created the following formula and grouped on this formula:
Formaul CustomerProdcut:
------------------------
ToText({Customer.Customer ID},0) + "-" + ToText({Product.Product ID},0)
In the details section of the report I placed the quantity field from the Orders_Detail table. This corresponds to the formula you cited in your original post (for the sake of the example, it doesn't matter if its an "if" formula or a database field, since your formula is a first pass formula and you are trying to sum it).
I then added a subtotal at the group level, so I could see what the target value for each group was.
Finally, I created the following formula and put it in the details section:
Formula SumCustomerProduct:
---------------------------
WhilePrintingRecords;
Sum({Orders_Detail.Quantity},{@CustomerProduct})
So apparently I don't understand your problem correctly, because when I look at the results of SumCustomerProduct in each Customer's detail section, it looks like what I understand your request to be. I am only getting the total of that product for the individual customer.