-- 至少一个参数没有被指定值。
至少一个参数没有被指定值。见红色背景代码
Dim Filter As String
If e.node.Text = "加载所有行" Then
Filter = ""
Else
Dim dr As DataRow = e.Node.DataRow \'获取生成此节点的行
Dim y As Integer = dr("年")
Dim q As Integer =dr("季度")
Dim dt1 As New Date(y, 3 * (q - 1) + 1, 1) \'获取该季度的第一天
MessageBox.Show(dt1)
Dim dt2 As New Date(y, 3 * q, Date.DaysInMonth(y,3 * q)) \'获取该季度的最后一天
MessageBox.Show(dt2)
Dim pd As String = dr("开票单位简称")
Dim lx As String = dr("发票类型")
Dim lb As String = dr("类别")
Select Case e.Node.Level
Case 0
filter = "开票单位简称 = \'" & pd & "\'"
Case 1
Filter ="开票单位简称 = \'" & pd & "\'" & " And Year(发票日期) = " & y
MessageBox.Show(filter)
Case 2
Filter ="开票单位简称 = \'" & pd & "\'" & " And Year(发票日期) = " & y & " And 日期 >= #" & dt1 & "# And 日期 <= #" & dt2 & "#"
MessageBox.Show(filter)
[此贴子已经被作者于2020/10/30 16:08:57编辑过]