Dim N1 As Integer = e.Form.Controls("NF").value
Dim N2 As Integer = N1 - 1
Dim Y1 As Integer = e.Form.Controls("YF2").value '
Dim N11 As Integer = e.Form.Controls("NFF").value '
Dim Y11 As Integer = e.Form.Controls("YFF").value '
Dim JJ As String = e.Form.Controls("CPJJ").value '
Dim Filter As String = "1=1" '设置筛选条件
With e.Form.Controls("CPNF")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "年份 In ( '" & .Value.replace(",","','") & "')"
End If
End With
Dim tj1,tj2 As WinForm.RadioButton
tj1 = Forms("店铺").Controls("RadioButton1")
tj2 = Forms("店铺").Controls("RadioButton2")
If tj1.checked=True Then
Dim b As New SQLGroupTableBuilder("统计表","汇总表")
b.C
b.AddTable("汇总表", "仓店编号","档案","业务编号")
b.Groups.AddDef("部门名称")
If JJ="冬" Then
b.Totals.AddExp("积压成本金额","case when [冬季] is Null then 0 when [冬季] =0 then 0 else -isnull([成本金额],0)*(1-[冬季])/[冬季]")
End If
b.Filter = "(" & filter & ") and ((月份 <= '" & Y1 & "' and 年份 = '" & N1 & "') or (月份 <= 12 and 年份 < '" & N1 & "'))"
b.Build
end if
messagebox显示是b.Build这里的问题,
messagebox.show(1)
b.Build
messagebox.show(2)
这中间提示错误
[此贴子已经被作者于2019/12/25 16:34:39编辑过]