*Solved*.........
Hi
I'm looking to summarize all values in a specified column in a collection through a code stage (not looping).
In this collection called "Collection", I want a sum of all values in column "Numbers".
I don't read or write C# very well, so can someone provide a code that will work for this?
I tried to use the compute method, with no luck (MSDN)
Thanks a lot!
Hi
I'm looking to summarize all values in a specified column in a collection through a code stage (not looping).
In this collection called "Collection", I want a sum of all values in column "Numbers".
I don't read or write C# very well, so can someone provide a code that will work for this?
I tried to use the compute method, with no luck (MSDN)
Code:
private void ComputeBySalesSalesID(DataSet dataSet)
{
DataTable table;
table = dataSet.Tables["Collection"];
object sumObject;
sumObject = table.Compute("Sum(Numbers)", "");
}
Last edited: