I was trying to increment it but it was only storing the last years value.
I was trying this on Saturday actaully and I deleted the code, so I can't
show you what I had either to help out.
>>>>> is there a way to store the TotalGross and use that for a calculation
>>>>> within the foreach {} loop for the dsExpense so I can have the net
[quoted text clipped - 13 lines]
> I was trying this on Saturday actually and I deleted the code, so I can't
> show you what I had either to help out.
If you need to store individual values per year, then you could use a
generic e.g.
Dictionary<int, decimal> dicTotals = new Dictionary<int, decimal>();
Then, within your foreach loop:
if (!dicTotals.Contains(2004)
{
dicTotals.Add(2004, MyRunningTotal);
}
else
{
dicTotals[2004] += MyRunningTotal;
}
N.B. the above is probably not particularly efficient, but should work...

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Mike - 10 Mar 2008 15:22 GMT
I had something like that and it was only storing the last value.
>>>>>> is there a way to store the TotalGross and use that for a calculation
>>>>>> within the foreach {} loop for the dsExpense so I can have the net
[quoted text clipped - 31 lines]
>
> N.B. the above is probably not particularly efficient, but should work...