问题:月报表窗口,生成11月份报表,VV 25在11月份没有进出库,所以在月结表中没有显示,实际是有库存的,按钮代码错在哪?
月结表.Table 356,352大小,为什么提示文件类型不正确而不能上传附件? 只能先贴上代码
DataTables("月报表").DataRows.Clear
Dim s As String = e.Form.Controls("月份").Value
If s <> "" Then
Dim f As New Filler
f.SourceTable = DataTables("入仓")
f.DataTable = DataTables("月报表")
f.ExcludeExistValue = True
f.Filter = "月份 = '" & s & "'"
f.Fill()
Dim f1 As New Filler
f1.SourceTable = DataTables("出仓")
f1.DataTable = DataTables("月报表")
f1.ExcludeExistValue = True
f1.Filter = "月份 = '" & s & "'"
f1.Fill()
For Each dr As DataRow In DataTables("月报表").DataRows
Dim s1 As String = "型号 = '" & dr("型号") & "' And 规格 = '" & dr("规格") & "' And 月份 = '" & s & "'"
dr("本月入仓") = DataTables("入仓").Compute("Sum(入仓数量)",s1)
dr("本月出仓") = DataTables("出仓").Compute("Sum(出仓数量)",s1)
s1 = "型号 = '" & dr("型号") & "' And 规格 = '" & dr("规格") & "' And 月份 < '" & s & "'"
dr("上月结存") = DataTables("入仓").Compute("Sum(入仓数量)",s1) - DataTables("出仓").Compute("Sum(出仓数量)",s1)
dr("本月库存") = dr("上月结存") + dr("本月入仓") - dr("本月出仓")
Next
End If