Public Class RepDay
Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load
Dim rpt As New CprDayss
CrystalReportViewer1.ReportSource = rpt
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim bill As New CprDayss
Dim rtoolID As Date = dtpSaleDate.Text
CrystalReportViewer1.SelectionFormula = "{Sale.SaleDate}='" & rtoolID & "'"
CrystalReportViewer1.ReportSource = bill
End Sub
End Class
'Using a conversion to a Crystal Date
selectionFormula="{tblMain.bday}=CDate('"& datetimepicker.value &"')"
'Using the Crystal Date literal
selectionFormula="{tblMain.bday}=#"& datetimepicker.value &"#"