以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助] 代码不执行  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=91972)

--  作者:zcgmxf
--  发布时间:2016/10/23 14:53:00
--  [求助] 代码不执行

老师,下面的代码  msgbox(2) 不执行,是什么原因?

If Tables("一类疫苗出库单").current IsNot Nothing Then
    If Tables("一类疫苗出库单.一类疫苗出库表").current IsNot Nothing Then
        Dim drs As List(Of DataRow) = Tables("一类疫苗出库单").Current.DataRow.GetChildRows("一类疫苗出库表")
        For n As Integer = 0 To drs.Count - 1 \'遍历所有子行
  msgbox(1)
            If n > 0  AndAlso drs(n-1)("确认下级退回") = True  AndAlso drs(n)("确认下级退回") = True Then \'
  msgbox(2)
                Dim tm As String  = ProjectPath & "Attachments\\打印一类疫苗退回冲单.doc" \'指定模板文件
                Dim fl As String = ProjectPath & "Reports\\打印一类疫苗退回冲单.doc" \'指定目标文件
                Dim wrt As New WordReport(Tables("一类疫苗出库单"),tm,fl) \'定义一个WordReport
                wrt.Build() \'逐行生成报表
                wrt.print
                wrt.quit
            Else
                PopMessage("明细表中有未""确认下级退回""的行!","提示",PopIconEnum.Error,3)
                Return
            End If
        Next
    Else
        MessageBox.Show("没有明细,无法打印!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
        Return
    End If
Else
    MessageBox.Show("没有出库单需要打印!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If


--  作者:zcgmxf
--  发布时间:2016/10/23 15:41:00
--  
请哪位老师指点指点哦,谢谢
--  作者:狐狸爸爸
--  发布时间:2016/10/23 17:24:00
--  

请不要重复发帖:

http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&Id=91965