Your documentation shows how to reference a previous item in the same column ( i.e., [Total (-1)] ) when trying to do a running total. Now, how do you reference the previous item when it's in a previous group? [Total(-1)] doesn't work here, and neither does [Total(-2)] or [Total(-3)].
TIA
By Group, I mean OutlookGroupBy group. I am grouping a series of payments by Year, and the running total needs to be able to use the running total from December of the year before. The formula works fine when the grid is ungrouped, but I cannot find the correct way to reference the previous row when it's in the previous OutlookGroupBy group (in this case, the previous year).
Does no one have an answer for this? I can't believe someone hasn't run into this problem, surely SOMEONE has had to group/ungroup results and do a calculation formula that calculates the same regardless of the grouping!
Perhaps I am in the wrong forum. Should this problem be posted elsewhere???
Hello,
No, that was it! When I set the grid's FormulaRowIndexSource to FormulaRowIndexSource.ListIndex, the formula worked whether I grouped by year or not! I was able to simplify the formula to:
grdSupportArrears.DisplayLayout.Bands[0].Columns["Total"].Formula = "[Arrears] + if (iserror ( [Total (-1)] ), [//txtSupportTotal], " + "[Total (-1)] ) - [AmtIntercepted]";
That way, I never had to reference a "[Total(-2)]" in the formula.
Thanks so much for your help!
Hi,
I looked into this and it doesn't seem like there is any way to do it. You could set the FormulaRowIndex to use the ListIndex. The ListIndex is the index of the row in the BindingManager's list, so it's essentially the original order of the data which will not account for sorting or grouping. Your calculation would be based on the original order of the data and ignore sorting and grouping. But it doesn't sound like that's what you want.
I'm pretty sure that there is no way to do this. But let me check into it a little further and do some research to see if I can find a way.