Dim rdoUnit1 As WinForm.RadioButton = e.Form.Controls("rdo_UnitFirst")
Dim rdoUnit2 As WinForm.RadioButton = e.Form.Controls("rdo_UnitSecond")
Dim chkSummary As WinForm.CheckBox = e.Form.Controls("chk_Summary")
Dim i As Integer, n As Integer
Dim strSpe() As String
Dim strUnit() As String
Dim g As New CrossTableBuilder("统计表1", DataTables("设备材料表"))
If rdoUnit1.Checked Then
g.HGroups.AddDef("主项")
g.VGroups.AddDef("专业", "{0}_金额")
Else
g.HGroups.AddDef("专业")
g.VGroups.AddDef("主项", "{0}_金额")
End If
g.Totals.AddDef("金额", "金额")
g.HorizontalTotal = True
g.VerticalTotal = True
g.VerticalProportion = True
Output.Show(chkSummary.Checked)
If chkSummary.Checked = True Then
g.Subtotal = True \'生成汇总模式
g.SubtotalLevel = 0 \'只生成总计行
Else
g.Subtotal = False \'不生成汇总模式
End If
g.Build()
Tables("Form_Stastistics_tbl_Stastistics").DataSource = DataTables("统计表1")