J
James E
I have a weird situation, working with some data from an old unix system.
There is a tree structure, where all nodes (i.e. non-leaf nodes) can have
values, as well as the leaf nodes.
Node 1 (Root Node) - Value 50.00
I have loaded the data into a dataset, with a single datatable, parent-child
relationship and a Primary Key column. Once the data is loaded, I have added
an expression column with the expression:
Sum(child(myRelationName).Value)
this works ok up to a point, giving me a column that displays the sum value
of each nodes children, but what I am after is this. I want to have a column
that displays, at each node level, the sum of the nodes value plus the sum
of the children and those childrens children, etc, etc.
In my example above, the values would be as follows (given a new column name
'NewVal'):
Node 1 (Root Node) - Value 50.00 NewVal 300.00 (50.00 + 100.00 + 150.00)
Node 4 (Root Node) - Value 250.00 NewVal 700.00 (250.00 + 75.00 + 375.00)
only)
ok...hope I have explained that alright. Can anyone help me with this
one...please!
Cheers
James E
There is a tree structure, where all nodes (i.e. non-leaf nodes) can have
values, as well as the leaf nodes.
Node 1 (Root Node) - Value 50.00
I have loaded the data into a dataset, with a single datatable, parent-child
relationship and a Primary Key column. Once the data is loaded, I have added
an expression column with the expression:
Sum(child(myRelationName).Value)
this works ok up to a point, giving me a column that displays the sum value
of each nodes children, but what I am after is this. I want to have a column
that displays, at each node level, the sum of the nodes value plus the sum
of the children and those childrens children, etc, etc.
In my example above, the values would be as follows (given a new column name
'NewVal'):
Node 1 (Root Node) - Value 50.00 NewVal 300.00 (50.00 + 100.00 + 150.00)
only)only)
Node 4 (Root Node) - Value 250.00 NewVal 700.00 (250.00 + 75.00 + 375.00)
only)
ok...hope I have explained that alright. Can anyone help me with this
one...please!
Cheers
James E