How to sum up all details that belong to current master row?

M

mcchu

I like to sum up all details that belong to current master row. My schema is
as follows:

myFields
Categories
Category
CategoryID
Description
Products
Product
PCategoryID
ProductID
PDescription
Price
Total

I set the default value for Total to
sum(current()/../my:product/my:price)

and the result of my total is always 0 in this case.

If I set the default value for Total to
sum(../my:product/my:price)

and the result of my total is always the total of all prices nor matter what
the category the product is in.

I am using master for Category (CategoryID) and detail for Product
(PCategoryID). I only want the total to sum up all prices for all products
within each category.

Thanks for the reply.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top