It was already commented by Hilary Metcalf, and I agree with her in basicaly.
(In many cases, that's too bad/that's a shame/that's unfortunate.)
'ざんねん(残念)'は、おもったとおりにならなくて、あきらめきれないことや、くやしいとおもうことをしめしています。
(My poor english, when things will not go as expected, can not give up to think about those things)
ざんねんでした = それはわたしにとってもざんねんなことでした
おもったとおりにならない、ということから、あまりよくなかったときに、ひにくをこめてつかわれることもあります。