如何按日期对此进行适当排序? (带图片)

时间:2014-09-03 05:28:31

标签: vb.net visual-studio-2010 crystal-reports ms-access-2010 oledb

enter image description here

表的名称是 tblFuelTransactionLogs ,我总结的数据是价格。 我用来填充在报告中正常工作的字段的查询是:

MyCommand.CommandText = "SELECT Price, Created_Date FROM tblFuelTransactionLogs" & _
"WHEREYear(Created_Date)='" & year & "' and Month(Created_Date)='" & month & "'"

我用于“60美元”的公式只是:

  

总和({tblFuelTransactionLogs.Price})

如何按日期过滤总和? 任何想法都会非常有用!

1 个答案:

答案 0 :(得分:1)

好的问题我看到很简单...

1.不要将公式设为Sum ({tblFuelTransactionLogs.Price}),而只使用({tblFuelTransactionLogs.Price}),因为它位于详细信息部分。

2.右键单击公式并转到Insert ---> summary --> insert summary in footer