老师好!
按老师指导的方法做了后报如下错误:Conversion from string "是否开piao='不开piao'" to type 'Long' is not valid.
“是否开piao”我设的是字符格式,不知道怎么还是报这个错。
For Each nd As WinForm.TreeNode In trv.AllNodes
Dim kp As String =nd.DataRow("是否开piao")
Dim Year As Integer = nd.DataRow("年")
Dim Month As Integer = nd.DataRow("月")
Dim Product As String = nd.DataRow("产品")
Select Case nd.Level
Case 0
nd.Text = nd.text & "(" & dt.Compute("Sum(订单数)","是否开piao='"& kp &"'" ) & "条)"
'
Case 1
nd.Text = nd.text & "年(" & dt.Compute("Sum(订单数)","是否开piao='"& kp &"'"and"年 = " & Year) & "条)"
Case 2
nd.Text = nd.text & "月(" & dt.Compute("Sum(订单数)","是否开piao='"& kp &"'"and "年 = " & Year & "" And "月 = " & Month) & "条)"
Case 3
nd.Text = nd.text & "(" & nd.DataRow("订单数") & "条)"
End Select
Next
trv.Nodes.Insert("显示所有行","显示所有行(" & dt.Compute("Sum(订单数)") & "条)",0)
trv.ResumeRedraw
[此贴子已经被作者于2020/2/11 16:51:04编辑过]