Foxtable(狐表)用户栏目专家坐堂 → [求助]窗口筛选中如何加入交叉查询


  共有7795人关注过本帖树形打印复制链接

主题:[求助]窗口筛选中如何加入交叉查询

帅哥哟,离线,有人找我吗?
don
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:八尾狐 帖子:1812 积分:12993 威望:0 精华:14 注册:2008/10/11 18:07:00
  发帖心情 Post By:2012/6/13 18:04:00 [显示全部帖子]

你沒設置統計條件:

Dim Filter As String
With e.Form.Controls("StartDate")
    If
 .Value IsNot Nothing Then
        If
 Filter >"" Then
            Filter = Filter & 
" And "
        
End If 
        Filter = Filter & 
"日期 >= #" & .Value & "#"
    
End If
End
 With
With
 e.Form.Controls("EndDate")
    If
 .Value IsNot Nothing Then
        If
 Filter >"" Then
            Filter = Filter & 
" And "
        
End If 
        Filter = Filter & 
"日期 <= #" & .Value & "#"
    
End If
End
 With
If
 Filter > "" Then
    Tables
("2012年数据").Filter = Filter
End
 If

 

Dim g As New CrossTableBuilder("统计表1", DataTables("2012年数据"))
g.Caption = "下属企业经营情况"
g.HGroups.AddDef("下属企业")
g.VGroups.AddDef("经营范围")
g.Totals.AddDef("项目编号", AggregateEnum.Count, "项目编号")
g.HorizontalTotal = True
g.VerticalTotal = True

g.Filter =  Filter 
g.Build()
MainTable = Tables("统计表1")


 回到顶部