Not really a scripting question...
...in the DONATIONS table create a SUMMARY field = total of the numeric donation amount field. That summary field can be used in a LIST view in a 'layout part' called a subsummary, and depending on what the subsummary field is sorted on, say, YEAR, then you would get an amount for each different year, and if you create another layout part called a trailing (or leading) grand summary, you will get a total for the DONOR (based on a multipredicate sort of DONOR / YEAR.)
There are a couple of ways to do this. To avoid going into LIST view to see the total by year, and to avoid having to sort the table to see the result, I would set up a second link between DONOR and DONATIONS (click on the plus sign in the relationships window, and set up DONATIONS 2). This link will use both the donorID fields in both tables, and the year of donation in the DONATIONS table with a flield in the DONOR table that you can put any year you like into. The calculation Sum(DONATION 2::amount) will then give you what you want; any year you put into the field in the DONORS table will show you the total for that year.
Does this cover what you were looking for?
Thanks for this info, I'll try it as soon as I'm back in the office on Tuesday.
Sent from my iPad