错误所在事件:窗口,生成文件,生成文件,Click
详细错误信息:
从字符串“名称”到类型“Integer”的转换无效。
输入字符串的格式不正确。
生成文件,Click----按钮代码:
Dim clbx1 As WinForm.CheckedListBox = e.Form.Controls("CheckedListBox1")
Dim clbx2 As WinForm.CheckedListBox = e.Form.Controls("CheckedListBox2")
For Each j As Integer In clbx2.CheckedIndices
Dim tm As String = ProjectPath & "模板文件\" & clbx2.Items(j) '指定模板文件
For Each i As Integer In clbx1.CheckedIndices
Dim fl As String = ProjectPath & "成品文件\" & clbx1.items(i)("名称") & clbx2.Items(j) '指定目标文件
Dim nm As String = CurrentTable.Name
Dim wrt As New WordReport(Tables(nm),tm,fl) '定义一个WordReport
Dim dr As DataRow =DataTables(nm).Find("_Identify = '" & clbx1.items(i)("_Identify") & "'")
If dr IsNot Nothing
wrt.BuildOne(dr)
wrt.quit
Dim proc As new Process
proc.File = fl
proc.Start
End If
Next
Next