Dim school As String = User.Group
If user.IsRole("区业务主管")
e.Form.Controls("label1").text = "中考信息统计"
Else
e.Form.Controls("label1").text = school & "中考信息统计"
End If
Dim lbl As WinForm.Label = e.Form.Controls("Label1")
If e.Form.width > lbl.Width
lbl.Left = (e.Form.width - lbl.Width ) / 2
End If
Dim t As Table = e.Form.controls("Table2").Table
If user.IsRole("区业务主管")
t.Fill("sele ct xxmc,bjdm, (se lect count(*) from {中考表} as b where a.xxmc=b.xxmc and a.bjdm=b.bjdm as 人数, (Sele ct count(*) from {中考表} As b where a.xxmc=b.xxmc And a.bjdm=b.bjdm And xb='1') as 男,(sel ect count(*) from {中考表} as b where a.xxmc=b.xxmc and a.bjdm=b.bjdm and xb='2') as 女, (sel ect count(*) from {中考表} as b where a.xxmc=b.xxmc and a.bjdm=b.bjdm and hklb='1') as 农业户口, (sel ect count(*) from {中考表} as b where a.xxmc=b.xxmc and a.bjdm=b.bjdm and hklb='2') as 非农业户口 from (sel ect xxmc,bjdm from {中考表} group by xxmc,bjdm) as a", "180.153.1 08.50", True)
End If
t.sort = "xxmc,bjdm"
For Each c As Col In t.Cols
If c.IsNumeric Then
c.GrandTotal = True
End If
Next
t.GrandTotal = True
t.AutoSizeCols()
sql语法错误,老师,对sql语句不懂,照到改了一个统计,提示错误,请问是哪里有误