this seems to work when i put an item in it to filter, but i don’t want to add a filter, ie just happy to sum the column and that’s it.
i’ve tried passing in string.empty and “” but no joy:
object objColTotal;
objColTotal = _dataSetDataTable.Compute("Sum(Price)", "");
decimal tot = Convert.ToDecimal(objColTotal);
An empty string should work.
You can always use a filter that you are certain will include all your records.
Quick test on a Decimal column:
I get the correct answer: 6.6