Foxtable(狐表)用户栏目专家坐堂 → [求助] 汇总更新问题


  共有1786人关注过本帖平板打印复制链接

主题:[求助] 汇总更新问题

帅哥哟,离线,有人找我吗?
sanny
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:798 积分:5911 威望:0 精华:0 注册:2018/11/3 8:24:00
[求助] 汇总更新问题  发帖心情 Post By:2018/12/1 9:42:00 [只看该作者]

版主,请指导一下,我用以下两个代码,在customsinvoice表属性中都试了,可还是有点问题。

 

另外一个汇总表中的 Netweight_total 只有当totalprice发生变化时,netweight_total汇总才会更新,我是让netweight_total列发生变化时,netweight_total汇总就会更新,当然汇总表中totalprice 当totalprice 变更时会同步更新。

以下哪儿错了吗?感谢。

 

 

If e.DataCol.Name = "ShippingNo"  OrElse e.DataCol.Name = "Totalprice" OrElse e.DataCol.Name = "Netweight_total" Then
   Dim pr As DataRow
   pr = DataTables("Shipment").Find("ShippingNo = '" & e.DataRow("ShippingNo") & "'")
   If pr IsNot Nothing Then
     DataTables("Shipment").DataCols("ShippingNo").RaiseDataColChanged(pr)
  End If
End  If

 

或者改这样:

 

If e.DataCol.Name = "ShippingNo"  OrElse e.DataCol.Name = "Totalprice" OrElse e.DataCol.Name = "Netweight_total" Then
   Dim pr As DataRow
   pr = DataTables("Shipment").Find("ShippingNo = '" & e.DataRow("ShippingNo") & "'")
   If pr IsNot Nothing Then
     DataTables("Shipment").DataCols("ShippingNo").RaiseDataColChanged(pr)
  End If
End  If

 

If e.DataCol.Name = "ShippingNo"  OrElse e.DataCol.Name = "Netweight_total" Then
   Dim pr As DataRow
   pr = DataTables("Shipment").Find("ShippingNo = '" & e.DataRow("ShippingNo") & "'")
   If pr IsNot Nothing Then
     DataTables("Shipment").DataCols("ShippingNo").RaiseDataColChanged(pr)
  End If
End  If

 


 回到顶部
总数 11 1 2 下一页