If Tables("时间节点_Table1").Cols.Contains("合计") Then
e.Form.Controls("jiZhiTime").Error="请选择截止时间"
Return
End If
''获取统计控件的值
Dim chuiZhi As String = e.Form.Controls("chuiZhi").Value
Dim chuiZhi1 As String = e.Form.Controls("chuiZhi1").Value
If chuiZhi Is Nothing Then
e.Form.Controls("chuiZhi").Error="请选择垂直分组列"
Return
Else If chuiZhi = chuiZhi1 Then
e.Form.Controls("chuiZhi1").Error="垂直分组列1和2不允许重复"
Return
Else
chuiZhi = chuiZhi.Replace(" ","")
chuiZhi1 = chuiZhi.Replace(" ","")
End If
Dim b As New CrossTableBuilder("统计表1", DataTables("时间节点_Table1"))
b.HGroups.AddDef("离退休单位") '添加单位列用于水平分组
If chuiZhi1 Is Nothing Then
b.VGroups.AddDef(chuiZhi,chuiZhi & "_{0}" ) '添加垂直分组
Else
b.VGroups.AddDef(chuiZhi) '添加垂直分组
b.VGroups.AddDef(chuiZhi1) '添加垂直分组
End If
b.Totals.AddDef(chuiZhi, AggregateEnum.Count) '添加用于统计
b.HorizontalTotal = True '水平方向生成汇总
b.VerticalTotal = True '垂直方向生成汇总
b.Build
Tables("时间节点_Table1").DataSource = DataTables("统计表1")
''设置表格居中
For Each c As Col In Tables("时间节点_Table1").Cols
c.TextAlign = TextAlignEnum.Center
Next
''使得按钮点完后,不要再是选定色
e.form.controls("Table1").Select
为啥红色那里我选了两个分组列,但是,表里出来只有1层,没有俩层?