[fix bug 1066332] Ensure that year var in reports is always a number.