以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 感谢狐表让我出色完成了任务,还有一个问题希望得到帮助 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=116519) |
-- 作者:蝠 -- 发布时间:2018/3/26 10:37:00 -- 感谢狐表让我出色完成了任务,还有一个问题希望得到帮助 如何在窗口上添加一个文字栏, 里面显示查询筛选后数据的总和 |
-- 作者:蝠 -- 发布时间:2018/3/26 10:38:00 -- Dim sj1 As WinForm.DateTimePicker = e.Form.Controls("时间1") Dim sj2 As WinForm.DateTimePicker = e.Form.Controls("时间2") Dim cp As WinForm.ComboBox = e.Form.Controls("产品") Dim pt As WinForm.ComboBox = e.Form.Controls("平台") Dim hx As WinForm.ComboBox = e.Form.Controls("是否核销") Dim filter As String = "1=1" If pt.Value <> Nothing Then filter &= " and 销售平台 like \'%" & pt.Text & "%\'" End If If sj1.Value <> Nothing Then filter &= " and 制单日期 >= #" & sj1.value & "#" End If If sj2.Value <> Nothing Then filter &= " and 制单日期 <= #" & sj2.value & "#" End If If cp.Value <> Nothing Then filter &= " and 订购产品 like \'%" & cp.Text & "%\'" End If If hx.Value <> Nothing Then filter &= " and 是否核销 like \'%" & hx.Text & "%\'" End If Tables("数据明细").Filter=filter
|
-- 作者:有点甜 -- 发布时间:2018/3/26 10:44:00 -- Tables("数据明细").Filter=filter Dim lbl As WinForm.Label = e.form.controls("label88") lbl.text = "总数:" & Tables("数据明细").compute("sum(订购数量)") |
-- 作者:蝠 -- 发布时间:2018/3/29 11:57:00 -- ("label88")是控件名字吗? Dim lbl As WinForm.Label = e.form.controls("金额") lbl.text = "金额:" & Tables("数据明细").compute("sum(订购金额)") Dim lbl As WinForm.Label = e.form.controls("单数") lbl.text = "单数:" & Tables("数据明细").compute("Count(客户姓名)") 然后 Dim lbl As WinForm.Label = e.form.controls("单数") 报错
|
-- 作者:有点甜 -- 发布时间:2018/3/29 12:18:00 -- Dim lbl As WinForm.Label = e.form.controls("金额")
lbl.text = "金额:" & Tables("数据明细").compute("sum(订购金额)")
lbl = e.form.controls("单数")
lbl.text = "单数:" & Tables("数据明细").compute("Count(客户姓名)")
|