[英]Date selection for produce report using VB.NET, SQL Server 2008 and Crystal Reports
請您的幫助解決我與上述主題相關的問題。
我需要創建一個程序來過濾報告,下面是我的代碼
FrLaporan_Penjualan.CrystalReportViewer1.SelectionFormula = _
"{TDetail_Transaksi.Tanggal_Transaksi} >= DateTime(" & Format(DateTimePicker1.Value,"yyyy-MM-dd HH:mm:ss") & ") " & "
and {TDetail_Transaksi.Tanggal_Transaksi} <= Datetime(" & Format(DateTimePicker2.Value, "yyyy-MM-dd HH:mm:ss") & ")"
FrLaporan_Penjualan.CrystalReportViewer1.RefreshReport()
FrLaporan_Penjualan.Show()
運行該程序后,我不斷收到相同的錯誤消息“)”,請提供幫助,並非常感謝
謝謝
我認為您在公式的第一部分中有太多“&”號和雙引號。 我也不知道一開始的下划線是什么? 因此,嘗試一下:
FrLaporan_Penjualan.CrystalReportViewer1.SelectionFormula =
("{TDetail_Transaksi.Tanggal_Transaksi} >= DateTime(" & Format(DateTimePicker1.Value,"yyyy-MM-dd HH:mm:ss") & ")"
and {TDetail_Transaksi.Tanggal_Transaksi} <= Datetime(" & Format(DateTimePicker2.Value, "yyyy-MM-dd HH:mm:ss") & ")")
FrLaporan_Penjualan.CrystalReportViewer1.RefreshReport();
FrLaporan_Penjualan.Show();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.