不理解你的意思
If Tables("收购销售查询窗口_Table1").Cols(1).name = "猪主姓名" Then
Dim g As New GroupTableBuilder("统计表10", Tables("收购销售查询窗口_Table1").DataTable)
g.Groups.AddDef("日期", DateGroupEnum.none)
g.Totals.AddDef("头数", "", "头数_值")
g.Totals.AddDef("重量", "", "重量_值")
g.Totals.AddDef("收购金额", "", "金额_值")
g.SamePeriodGrowth = True
g.CircleGrowth = True
g.GroupProportion = True
g.Build()
Tables("统计表10").AutoSizeCols(10)
With Tables("统计表10").PrintInfo
.Title = vars("gg") &"生猪收购月统计表"
.PageFooter = "第[PageNo]页,共[PageCount]页"
.PageFooterLine = True
.PaperKind = 9
.FitIntoPage = True
.LandScape = True '横向打印
End With
Tables("统计表10").Print(True, False)
Else
MessageBox.Show("请先加载收购!")
End If