Sum of two databands
Posted: Fri Jul 08, 2011 7:21 am
Hi,
I have two walues X and Y that will be presented as a column but they get their value from diffrent tags in a XML file. I want to show the sum of the two values beneath. Like this:
X
Y
Sum
Now I get the values from the datasource by adding two databands with filters on the xml-tag i want. Later I try to show the sum in an textbox with the expression {Sum(DataBand1, Value2.Value_Text)+Sum(DataBand2, Value2.Value_Text)} but this doesn´t work! It is only showing the value from the first databand. If I try this {100+Sum(DataBand1, Value2.Value_Text)}, it summarize as expected and I have tried with both of the bands. There are only one value(row) in both bands. It seams that I can´t summarize the value from two bands. Why?
Is there another way of solving this?
Thank you for your help!
I have two walues X and Y that will be presented as a column but they get their value from diffrent tags in a XML file. I want to show the sum of the two values beneath. Like this:
X
Y
Sum
Now I get the values from the datasource by adding two databands with filters on the xml-tag i want. Later I try to show the sum in an textbox with the expression {Sum(DataBand1, Value2.Value_Text)+Sum(DataBand2, Value2.Value_Text)} but this doesn´t work! It is only showing the value from the first databand. If I try this {100+Sum(DataBand1, Value2.Value_Text)}, it summarize as expected and I have tried with both of the bands. There are only one value(row) in both bands. It seams that I can´t summarize the value from two bands. Why?
Is there another way of solving this?
Thank you for your help!