Hi Friends,
I am using crystal report to get the list of students registered between two dates. I am using vb6 as front end I've written following code to display report:
VB Code:
With crStudList .Connect = strConn .ReportFileName = App.Path & "\reports\StudentList.rpt" .ReportTitle = "Student List" .WindowTitle = "Student List" .SelectionFormula = "{tblStudent.RegistrationDate}>=#" & dtpFrom.Value & "# and {tblStudent.RegistrationDate}<=#" & dtpTo.Value & "#" .WindowState = crptMaximized .Destination = crptToWindow .Action = 1 End With
Where DtpFrom and and dtpTo are DtpPicker control which are used to select start and end date value. I've set its format to customFormat and Custom format i've set is "dd/MM/yyyy"
Its not giving any errors but if i give 01/02/2006 as start date and 28/02/2006 as end date, it should display only students' who have register in between these two dates but it displays all who registered in 02/01/2006 or 20/01/2006 or 08/01/2006.
plz help.
thx a lot




Reply With Quote