删除数据后重置无效,手动重置也无效Select Case e.DataCol.name
Case "日期"
Dim r As Date = e.DataRow("日期")
e.DataRow("广告费") = DataTables("百度消费").Compute("Sum(消费)", Filter) / DataTables("客服").Compute("count(姓名)", Filter)
Dim Total As Single
Total = DataTables("客服").Compute("Min(广告费)",filter)
DataTables("客服").ReplaceFor("广告费", Total, filter)
e.DataRow("点击") = DataTables("百度消费").Compute("Sum(点击)", Filter) / DataTables("客服").Compute("count(姓名)", Filter)
Dim Total2 As Single
Total2 = DataTables("客服").Compute("Min(点击)",filter)
DataTables("客服").ReplaceFor("点击", Total2, filter)
End Select
以下也是不自动计算需要手动重置
Select Case e.DataCol.Name
Case "开始时间"
Dim str As String = e.DataRow("开始时间")
Dim mc = System.Text.RegularExpressions.Regex.Matches(str,"\d{4}-\d{1,2}-\d{1,2}")
Dim mc1 = System.Text.RegularExpressions.Regex.Matches(str,"\d+?(?=:)")
If e.DataRow.IsNull("开始时间") Then
e.DataRow("时") = Nothing
e.DataRow("日期") = Nothing
Else
e.DataRow("日期") = mc(0).value
e.DataRow("时") = mc1(0).value
End If
End Select
[此贴子已经被作者于2018/5/25 21:29:34编辑过]