以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  合计数字如何添加  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=60102)

--  作者:utcxray
--  发布时间:2014/11/18 13:24:00
--  合计数字如何添加
窗口中SQLQUERY表,
select语句:select 供应商,型号,数量,单价,数量*单价 as 金额,账期,付款,负责人,项目名称,采购日期 from {采购明细} where 付款 IS NULL order by 采购日期

窗口中筛选树代码Dim Filter As String = ""
If e.node.Name <> "显示所有行" Then
    Dim d1 As Date
    Dim d2 As Date
    Dim Year As Integer = e.Node.DataRow("年")
    Dim Month As Integer = e.Node.DataRow("月")
    Dim Productor As String = e.Node.DataRow("供应商")
    Select Case e.Node.Level
          Case 0
                        Filter = "供应商 = \'" & Productor & "\'"
                  Case 1
                       d1 = New Date(Year,1,1) \'取得该年的第一天
                      d2 = new Date(Year,12,31) \'取得该年的最后一天
                     Filter = "账期 >= #" & d1 & "# And 账期 <= #" & d2 & "# And 供应商 = \'" & Productor & "\'"
         Case 2
            d1 = New Date(Year, Month, 1) \'取得该月的第一天
            d2 = new Date(Year, Month, Date.DaysInMonth(Year,Month)) \'取得该月的最后一天
           Filter = "账期 >= #" & d1 & "# And 账期 <= #" & d2 & "# And 供应商 = \'" & Productor & "\'"

End If
Tables("对账单_table1").Filter = Filter
问题:如何在底部加入“合计”的数字
图片点击可在新窗口打开查看此主题相关图片如下:无标题.png
图片点击可在新窗口打开查看

--  作者:Bin
--  发布时间:2014/11/18 14:16:00
--  
直接用合计模式 http://www.foxtable.com/help/topics/2750.htm
--  作者:有点甜
--  发布时间:2014/11/18 14:17:00
--  

 参考

 

http://www.foxtable.com/help/topics/2750.htm

 


--  作者:utcxray
--  发布时间:2014/11/18 14:33:00
--  
谢谢!
问题已解决
With Tables("对账单_Table1")
    .Cols("数量").GrandTotal = True \'指定要合计的列
    .Cols("金额").GrandTotal = True
    .GrandTotal = True \'显示合计模式
End With