Problem with Date in Crystal Report
following is the coding which i am using to see the report between two days of user's choice. Problem is that if i enter the date 10/10/2005 and 10/12/2005 it should show the reports for the records between those two days. Buuuut, it is showing almost all records. i.e data is not getting filtered.
'--------------------------------------------------------------
Dim Fltr
report.ReportFileName = App.Path & "\SampleReport.rpt"
Fltr = "{Rep.E_Date}>='" & Trim(Text1.Text) & "' and {Rep.E_Date} _
< = '" & Trim(Text2.Text) & "'"
report.Formulas(0) = "abc='" & Trim("Report between date") & "'"
report.ReplaceSelectionFormula (Fltr)
report.WindowState = crptMaximized
report.Action = True
'------------------------------------------------------
Rep is a table name
E-Date is a field name
may be there is a problem with SQL query written for date
i need help to solve this problem
thanks in advance
|