以下是引用易服在2009-7-2 15:23:00的发言:
谢谢 !通过测试吗? 1
不通过我也不会上传的,呵
If ( e.Form.Controls("RadioButton1").Checked Or e.Form.Controls("RadioButton2").Checked Or e.Form.Controls("RadioButton3").Checked)= False Then
Messagebox.Show("选一个项目")
Return
End If
If ( e.Form.Controls("RadioButton4").Checked Or e.Form.Controls("RadioButton5").Checked )= False Then
Messagebox.Show("选一个面积")
Return
End If
Dim Filter As String
Dim cmb As WinForm.ComboBox=e.Form.Controls("ComboBox1")
If cmb.Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "乡名= '" & cmb.Value & "'"
End If
Dim g As New CrossTableBuilder("交叉统计", DataTables("总览"),Filter)
If e.Form.Controls("RadioButton1").Checked Then g.VGroups.AddDef("造林年度","{0}年_总面积")
If e.Form.Controls("RadioButton2").Checked Then g.VGroups.AddDef("造林类别","{0}_总面积")
If e.Form.Controls("RadioButton3").Checked Then g.VGroups.AddDef("林种","{0}_总面积")
If e.Form.Controls("RadioButton4").Checked Then g.Totals.AddDef("保存面积","总面积")
If e.Form.Controls("RadioButton5").Checked Then g.Totals.AddDef("退耕地","总面积")
If cmb.Value IsNot Nothing Then
g.HGroups.AddDef("村名")
Else
g.HGroups.AddDef("乡名")
End If
g.HorizontalTotal = True
g.VerticalTotal = True
g.HorizontalProportion = True
g.VerticalProportion = True
g.Build()
MainTable = Tables("交叉统计")
[此贴子已经被作者于2009-7-2 15:30:38编辑过]