以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]选择多行后,能在右下角显示计数,怎么实现?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=54904)

--  作者:hrw68529
--  发布时间:2014/8/7 8:27:00
--  [求助]选择多行后,能在右下角显示计数,怎么实现?
[求助]选择多行后,能在右下角显示计数,怎么实现?
现在是:只有是数据的列,才能显示,不是数据列不显示,如何实现不是数据列也显示呢,谢谢

--  作者:hrw68529
--  发布时间:2014/8/7 8:46:00
--  
点击自动计算后,不是数值型的不显示,如何实现不是数据型的列,选择后在右下角显示计数?
--  作者:Bin
--  发布时间:2014/8/7 8:48:00
--  
http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=39213&skin=0
--  作者:hrw68529
--  发布时间:2014/8/7 8:55:00
--  
就一个标准按钮,没反应啊
--  作者:Bin
--  发布时间:2014/8/7 8:59:00
--  
选中计算范围
--  作者:hrw68529
--  发布时间:2014/8/7 9:01:00
--  
全是数值型的,选中不是数据值型的不行


--  作者:hrw68529
--  发布时间:2014/8/7 9:03:00
--  
看到了,但自动计算的代码在哪,找不到
--  作者:Bin
--  发布时间:2014/8/7 9:08:00
--  

关键函数:

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

 

关键事件:

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


--  作者:hrw68529
--  发布时间:2014/8/7 9:25:00
--  
Dim str1 As String = ""
Dim t As Table = CurrentTable
这段代码的“自动计算”在快速访问栏里,如果“自动计算”用的是杂项里的“自动计算”,怎么改写代码?
If QAT.Items("自动计算").Pressed  = True Then
    Str1 = Str1 & "计数:" & t.Aggregate(AggregateEnum.Count, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " " 
    Str1 = Str1 & "累计:" & t.Aggregate(AggregateEnum.Sum, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
    Str1 = Str1 & "平均:" & t.Aggregate(AggregateEnum.Average, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
    Str1 = Str1 & "最大:" & t.Aggregate(AggregateEnum.Max, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
    Str1 = Str1 & "最小:" & t.Aggregate(AggregateEnum.Min, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
    Str1 = Str1 & "标准差:" & t.Aggregate(AggregateEnum.Std, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
    Str1 = Str1 & "总体标准差:" & t.Aggregate(AggregateEnum.StdPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
    Str1 = Str1 & "方差:" & t.Aggregate(AggregateEnum.Var, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
    Str1 = Str1 & "总体方差:" & t.Aggregate(AggregateEnum.VarPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
    RibbonMenu.StatusBar.Message3 = Str1
End If

--  作者:有点甜
--  发布时间:2014/8/7 9:57:00
--  

 直接写,你可以写到SystemIdle事件,或者直接用一个按钮

 

Dim str1 As String = ""
Dim t As Table = CurrentTable

Str1 = Str1 & "计数:" & t.Aggregate(AggregateEnum.Count, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "累计:" & t.Aggregate(AggregateEnum.Sum, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "平均:" & t.Aggregate(AggregateEnum.Average, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "最大:" & t.Aggregate(AggregateEnum.Max, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "最小:" & t.Aggregate(AggregateEnum.Min, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "标准差:" & t.Aggregate(AggregateEnum.Std, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "总体标准差:" & t.Aggregate(AggregateEnum.StdPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "方差:" & t.Aggregate(AggregateEnum.Var, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "总体方差:" & t.Aggregate(AggregateEnum.VarPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
RibbonMenu.StatusBar.Message3 = Str1