diff --git a/src/plugins/webreport/WebCal.py b/src/plugins/webreport/WebCal.py index c4d8fa2ed..40736b65c 100644 --- a/src/plugins/webreport/WebCal.py +++ b/src/plugins/webreport/WebCal.py @@ -414,12 +414,19 @@ class WebCalReport(Report): num_years = (self.end_year - self.start_year) cal_year = self.start_year - nrows = (num_years / 16) - for rows in range(0, (nrows + 1)): + # stylesheets other than "Web_Visually.css" will hold 22 years in a row + # otherwise, 18 years in a row + _stylesheet = 'Web_Visually.css' + years_in_row = 22 if self.css is not _stylesheet else 18 + + # simple mathematics was not working, so I did it for python + nrows = get_num_of_rows(num_years, years_in_row) + + for rows in range(0, nrows): of.write('