If e.DataCol.Name = "零件图号" Then
Dim ys As String() = {2015, 2016,2017}
For Each y As String In ys
If e.NewValue Is Nothing Then
e.DataRow("年" & y & "_A点_供应商简称") = Nothing
e.DataRow("年" & y & "_A点_含税单价") = Nothing
e.DataRow("年" & y & "_B点_供应商简称") = Nothing
e.DataRow("年" & y & "_B点_含税单价") = Nothing
Else
Dim dr As DataRow
dr = DataTables("价格表" & y).Find("[零件图号] = '" & e.NewValue & "'")
If dr IsNot Nothing
e.DataRow("年" & y & "_A点_供应商简称") = dr("A点_供应商简称")
e.DataRow("年" & y & "_A点_含税单价") = IIF(dr("A点_含税单价_更新后")=0, Nothing,dr("A点_含税单价_更新后"))
e.DataRow("年" & y & "_B点_供应商简称") = dr("B点_供应商简称")
e.DataRow("年" & y & "_B点_含税单价") = IIF(dr("B点_含税单价_更新后")=0, Nothing,dr("B点_含税单价_更新后"))
End If
End If
Next
End If
通过上面的程序,把价格表{2015, 2016,2017}汇总到“价格汇总表”时,怎么价格表里面为数字0的,汇总表为空呢?怎么修改程序?