已经用这个方法统计"征收数"表列的合计数,现在想在指定单元格合计另一张表列的合计数,好象只能指定一张表,同时指定另一张表结果就不对了
If e.DataCol.Name = "乡镇" Then '发生变化的是乡镇列.
'则累计订单表中同乡镇总的税种金额,然后赋值给变动行的税种列
e.DataRow("营业税") = DataTables("征收数").Compute("Sum(营业税)","[乡镇] = '" & e.NewValue & "'")
e.DataRow("企业所得税") = DataTables("征收数").Compute("Sum(企业所得税)","[乡镇] = '" & e.NewValue & "'")
e.DataRow("个人所得税") = DataTables("征收数").Compute("Sum(个人所得税)","[乡镇] = '" & e.NewValue & "'")
e.DataRow("资源税") = DataTables("征收数").Compute("Sum(资源税)","[乡镇] = '" & e.NewValue & "'")
e.DataRow("城建税") = DataTables("征收数").Compute("Sum(城建税)","[乡镇] = '" & e.NewValue & "'")
e.DataRow("房产税") = DataTables("征收数").Compute("Sum(房产税)","[乡镇] = '" & e.NewValue & "'")
e.DataRow("印花税") = DataTables("征收数").Compute("Sum(印花税)","[乡镇] = '" & e.NewValue & "'")
e.DataRow("城镇土地使用税") = DataTables("征收数").Compute("Sum(城镇土地使用税)","[乡镇] = '" & e.NewValue & "'")
e.DataRow("土地增值税") = DataTables("征收数").Compute("Sum(土地增值税)","[乡镇] = '" & e.NewValue & "'")
e.DataRow("车船税") = DataTables("征收数").Compute("Sum(车船税)","[乡镇] = '" & e.NewValue & "'")
e.DataRow("契税") = DataTables("征收数").Compute("Sum(契税)","[乡镇] = '" & e.NewValue & "'")
e.DataRow("耕地占用税") = DataTables("征收数").Compute("Sum(耕地占用税)","[乡镇] = '" & e.NewValue & "'")
e.DataRow("教育费附加") = DataTables("征收数").Compute("Sum(教育费附加)","[乡镇] = '" & e.NewValue & "'")
End If想合计另一张表到当前统计表中,两张表的税种是一样的,只是乡镇名称不一样
就想直接在统计表的下方指定一行统计另一张表的各税种的合计数,不知怎么实现?
[此贴子已经被作者于2010-3-4 10:38:53编辑过]