Dim k1 As String ="加工费_"
Dim k2 As String ="投工_"
Dim k3 As String ="人加工费_"
Dim k4 As String ="环比_"
With DataTables("年度汇总")
For j As Integer = 1 To i
'.DataCols.Add( k3 & j , Gettype(Double)) '动态增加列
r.DataTable.DataCols.Add( k3 & j , Gettype(Double),"iif(" & k2 & j =0,null," & k1 & j / k2 & j & ")")
.DataCols.Add( k4 & j , Gettype(Double)) '动态增加列
.DataCols( k1 & j ).SetFormat("0.00")
.DataCols( k2 & j ).SetFormat("0.00")
.DataCols( k3 & j ).SetFormat("0.00")
.DataCols( k4 & j ).SetFormat("0.00")
Next
End With