窗口的AfterLoad事件中的代码,只截了一部分用到的(byfk)就是引用表的表达式列
Dim dt7 As New Date(y, 1, 1)
Dim dt8 As New Date(y, 12, 31)
Dim Filter3 As String
Dim Filter4 As String
Filter3 = "rq >= '" & dt7 & "' And rq <= '" & dt8 & "'"
Filter4 = "rq < '" & dt7 & "'"
Dim cnt1 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt1 & "' And rq <= '" & dt2 & "'And zwlx = '公益性项目债务'")
Dim cnt2 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt1 & "' And rq <= '" & dt2 & "'And zwlx = '非项目债务'") + DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt1 & "' And rq <= '" & dt2 & "'And zwlx = '经营性项目债务'")
Dim cnt3 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt1 & "' And rq <= '" & dt2 & "'And zwlx = '棚改项目'")
Dim cnt4 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt1 & "' And rq <= '" & dt2 & "'")
Dim cnt5 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt3 & "' And rq <= '" & dt4 & "'And zwlx = '公益性项目债务'")
Dim cnt6 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt3 & "' And rq <= '" & dt4 & "'And zwlx = '非项目债务'") + DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt3 & "' And rq <= '" & dt4 & "'And zwlx = '经营性项目债务'")
Dim cnt7 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt3 & "' And rq <= '" & dt4 & "'And zwlx = '棚改项目'")
Dim cnt8 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt3 & "' And rq <= '" & dt4 & "'")
Dim cnt9 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt5 & "' And rq <= '" & dt6 & "'")
Dim cnt10 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt5 & "' And rq <= '" & dt6 & "'And zwlx = '公益性项目债务'")
Dim cnt11 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt5 & "' And rq <= '" & dt6 & "'And zwlx = '非项目债务'") + DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt5 & "' And rq <= '" & dt6 & "'And zwlx = '经营性项目债务'")
Dim cnt12 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt5 & "' And rq <= '" & dt6 & "'And zwlx = '棚改项目'")
Dim cnt13 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt7 & "' And rq <= '" & dt8 & "'")
Dim cnt14 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt7 & "' And rq <= '" & dt8 & "'And zwlx = '公益性项目债务'")
Dim cnt55 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt7 & "' And rq <= '" & dt8 & "'And zwlx = '公益性项目债务'And zwlb = '贷款融资'")
Dim cnt56 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt7 & "' And rq <= '" & dt8 & "'And zwlx = '公益性项目债务'And zwlb = '应付工程款'")
Dim cnt15 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt7 & "' And rq <= '" & dt8 & "'And zwlx = '非项目债务'") + DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt7 & "' And rq <= '" & dt8 & "'And zwlx = '经营性项目债务'")
Dim cnt57 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt7 & "' And rq <= '" & dt8 & "'And zwlx = '非项目债务'And zwlb = '贷款融资'") + DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt7 & "' And rq <= '" & dt8 & "'And zwlx = '经营性项目债务'And zwlb = '贷款融资'")
Dim cnt58 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt7 & "' And rq <= '" & dt8 & "'And zwlx = '非项目债务'And zwlb = '应付工程款'") + DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt7 & "' And rq <= '" & dt8 & "'And zwlx = '经营性项目债务'And zwlb = '应付工程款'")
Dim cnt16 As Integer = DataTables("xzfkmxb").sqlCompute("sum(byfk)/10000" , "rq >= '" & dt7 & "' And rq <= '" & dt8 & "'And zwlx = '棚改项目'")
[此贴子已经被作者于2020/7/7 10:27:40编辑过]