[求助]怎么在窗口设计点击按钮事件代码中加入调试代码,怎么加?
我的代码怎么提示(单位)不是表(生成一览表)中的错误呢?
我要加入调试代码怎么加请帮我下,谢谢
生成报表_生成12月报表_Click
Dim village As WinForm.ComboBox = e.Form.Controls("单位")
village.Combolist = DataTables("出生").GetCombolistString("单位名称")
Dim t As Table = Tables("生成一览表")
t.DataTable.DataRows.Clear
Dim drs As List(Of DataRow) = DataTables("出生").Select("单位名称 = '" & village.Text & "'")
For Each dr As DataRow In drs
If DataTables("生成一览表").Find("单位 = '" & dr("单位名称") & "' And 组名称 = '" & dr("组名称") & "'") Is Nothing Then
Dim r As Row = t.AddNew
r("单位") = dr("单位名称")
r("组名称") = dr("组名称")
Dim filter As String = "单位名称 = '" & dr("单位名称") & "' And 组名称 = '" & dr("组名称") & "'"
r("总人口数") =
r("已婚未育妇女_总数") =
r("出生_总数") =
r("死亡人数") = DataTables("死亡").Compute("Count(_Identify)", filter & " And 死亡日期 <= #2011-12-31#" )
r("自增人数") = r("出生_总数") - r("死亡人数")
r("迁移_迁入人数") = DataTables("迁入").Compute("Count(_Identify)", filter & " And 变动日期 <= #2011-12-31#" )
r("迁移_迁出人数") = DataTables("迁出").Compute("Count(_Identify)", filter & " And 迁出日期 <= #2011-12-31#" )
r("元月份以来新婚对数") = DataTables("新婚").Compute("Count(_Identify)", filter & " And 结婚日期 <= #2011-12-31#" )
End If
Next
Dim nr As Row = MainTable.AddNew
nr("单位") = "合计"
For i As Integer = 2 To MainTable.Cols.Count - 1
nr(MainTable.Cols(i).Name) = MainTable.Compute("Sum(" & MainTable.Cols(i).Name & ")")
Next
<!--EndFragment-->