【发布时间】:2012-01-30 07:45:54
【问题描述】:
我对如何汇总 Crystal Reports 8.01 中的所有记录有疑问。我正在使用 VB6。
example:
date tools in out
1/19/2012 stone 100 0
1/20/2012 stone 50 0
1/21/2012 stone 30 0
1/25/2012 stone 0 40
1/26/2012 stone 0 20
total in until now : 180
total out until now : 60
我在 VB 6 中使用以下代码:
With CrystalReport1
.SelectionFormula = "{stock.dates} >= #" & Format(DTPicker5.Value, "yyyy-mm-dd") & "# and {stock.dates}<= #" & Format(DTPicker6.Value, "yyyy-mm-dd") & "#"
End With
在 Crystal Reports 中,使用公式编辑器:
Sum ({stock.in}) ==> for total in
Sum ({stock.out}) ==> for total out
当我从 2012 年 1 月 19 日到 2012 年 1 月 26 日运行日期时,结果是:
total in until now : 180
total out until now : 60 its true
但是当我从 2012 年 1 月 20 日到 2012 年 1 月 26 日运行日期时,结果是:
total in until now : 80 (the value is change)
total out until now : 60
如何使总和的值在选择日期时从开始到最后一个日期不变?
【问题讨论】:
-
我努力了,但这个问题仍然没有多大意义。
-
可能他需要所有记录的总和,但只显示最后的一些记录。
-
是的,我需要所有记录的总和,但只显示一个
标签: sql-server vb6 crystal-reports