如果要统计全年累计,需要用到sql语句,具体可以参考如下代码,计算上一年12月26日-今天的总量
dim y as integer = e.datarow("日期").year
dim m as integer = e.datarow("日期").month
dim d as integer = e.datarow("日期").day
y = iif(m = 12 and day >= 26, y, y-1)
dim nd as date = new date(y, 12, 26)
Dim cmd As New SQLCommand
cmd.CommandText = "Select Sum(当班容量) From {你的表明} Where 日期 >= #" & nd & "# and 日期 <= #" & e.datarow("日期") & "#"