Sum of Data Column in DataSource
Posted: Fri Apr 18, 2014 6:32 pm
I have a simple datasource (datasource1) that contains two columns. There are two records in this datasource that contain numeric values. My data looks like this
ID VALUE
0 2.5
1 3
I am trying to display the sum of the data in the VALUE field in a text component. My expression is this
{Sum(datasource1.VALUE)}
If i place the text component directly in the report, it only returns the first value in the output (2.5).
If i drop the text component into a databand, the correct value appears (5.5) but is repeated (because the databand renders the value for each record in the datasource). Is there a correct way to accomplish what I am trying to do? It seems like it would be a simple task but it is eluding me currently. Thank you.
ID VALUE
0 2.5
1 3
I am trying to display the sum of the data in the VALUE field in a text component. My expression is this
{Sum(datasource1.VALUE)}
If i place the text component directly in the report, it only returns the first value in the output (2.5).
If i drop the text component into a databand, the correct value appears (5.5) but is repeated (because the databand renders the value for each record in the datasource). Is there a correct way to accomplish what I am trying to do? It seems like it would be a simple task but it is eluding me currently. Thank you.