错误:.NET Framework 版本:2.0.50727.7905
Foxtable 版本:2014.11.11.1
错误所在事件:
详细错误信息:
该字符串未被识别为有效的 DateTime。有一个从索引 9 处开始的未知字。
我写的代码:
Dim gx As WinForm.ComboBox = e.Form.Controls("工序")
Dim filter As String = "1=1"
If gx.Text > "" Then
filter &= " and 工程 = '" & gx.Text & "'"
End If
With e.Form.Controls("开始日期")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "作业日期 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("结束日期")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "作业日期 <= #" & .Value & "#"
End If
End With
Tables("检查").Filter = filter
Dim Book As New XLS.Book(ProjectPath & "Attachments\报表1.xls")
Dim fl As String = ProjectPath & "Reports\报表1.xls" (可以自定义保存地址吗?)
Dim Sheet As XLS.Sheet = Book.Sheets(0)
Sheet(3,9).Value = "<" & Tables("检查").Filter & ">" '写入打印条件
Book.Build() '生成细节区
Book.Save(fl) '保存工作簿
Dim Proc As New Process
Proc.File = fl
Proc.Start()
Syscmd.Table.ToggleSortAndFilter()
请各位看看有问题吗?