一次性汇总,每天追加记录可以参考变通。
ClearGrid(GridName) And AppendFor("学费车费总帐","交费项目,交费日期,入账金额","明细分类,收费日期,入帐金额") And DelReptRows(GridName,"收费日期","明细分类") And DelFor(GridName,"收费日期", "=" ,"") And DelFor(GridName,"明细分类", "=" ,"") And EvalFor(GridName,"入帐金额","SumFor(""学费车费总帐"",""入账金额"",""交费日期"",""="",[收费日期],""交费项目"",""="",[明细分类])") And AppendFor("考级总帐","交费项目,交费日期,缴费金额","明细分类,收费日期,入帐金额") And DelReptRows(GridName,"收费日期","明细分类") And DelFor(GridName,"收费日期", "=" ,"") And DelFor(GridName,"明细分类", "=" ,"") And EvalFor(GridName,"入帐金额","SumFor(""考级总帐"",""缴费金额"",""交费日期"",""="",[收费日期],""交费项目"",""="",[明细分类])","入帐金额", "=" ,0) And AppendFor("演出费总帐","交费项目,交费日期,实收费用","明细分类,收费日期,入帐金额") And DelReptRows(GridName,"收费日期","明细分类") And DelFor(GridName,"收费日期", "=" ,"") And DelFor(GridName,"明细分类", "=" ,"") And EvalFor(GridName,"入帐金额","SumFor(""演出费总帐"",""实收费用"",""交费日期"",""="",[收费日期],""交费项目"",""="",[明细分类])","入帐金额", "=" ,0) And ReplaceFor(GridName,"摘要","收入","摘要", "=" ,"")