比如
e.DataRow("统筹内") = format(DataTables("在职人员信息").Compute("Sum(基本基数)", Filter) / DataTables("在职人员信息").Compute("Sum(基本基数)", Filter2) * DataTables("社保下达").Compute("Sum(其中养统内)", Filter2 ) +0.001,"#")
改为
dim i1 as double = DataTables("在职人员信息").Compute("Sum(基本基数)", Filter2)
if i1 = 0 then
e.DataRow("统筹内") = 0
else
e.DataRow("统筹内") = format(DataTables("在职人员信息").Compute("Sum(基本基数)", Filter) / i1 * DataTables("社保下达").Compute("Sum(其中养统内)", Filter2 ) +0.001,"#")
end if
[此贴子已经被作者于2019/11/10 21:18:40编辑过]