只能写代码计算了,比如代码
Dim fdr = DataTables("子表").find("关联列 = '" & e.DataRow("关联列") & "'", "期数 desc")
If fdr Is Nothing Then e.DataRow("上期累计") = 0 Else e.DataRow("上期累计") = DataTables("子表").compute("sum(金额)", "关联列 = '" & e.DataRow("关联列") & "'") - fdr("金额") Else