My database has a table of parts that can be composed of other parts. They each have a Price field.
The Part table also has a Parent_Part field to represent an adjacent nodes tables (The parts hierarchy).
In the Load Script I use the hierarchy function to obtain the PathName of each Part
I can then visualise the hierarchy in a TreeView ListBox. (which is awesome by the way)
I tried to calulate the total cost of a Part (the sum of the cost of the sub parts) by adding the caculated expression : SUM(Price)
but I only get the the cost of one part.
How do you calculate the total cost of a Part?
Thanks for your help
It seems the expression in a TreeView does not behave the same as in charts.
I solved the problem of getting the recursive sum of all the subparts by adding a text Object with the same expression.
Since clicking on a contracted node of a treeView also selects all the sub nodes, the text object displays the total price of the part!