生成的表标题是什么样的?
……
b.HorizontalTotal = True '水平汇总
b.Decimals = 2
‘去掉’b.Build '生成统计表
Tables("查询 日报表_Table4").DataSource = b.builddatasource
Tables("查询 日报表_Table4").AutoSizeCols() '自动设置所有列的宽度
for eacj dc as datacol in dataTables("查询 日报表_Table4").datacols
if dc.caption like "*金额*" then
dc.SetFormat("#,###.00")
endif
next