Results 1 to 7 of 7

Thread: [RESOLVED] Crystal Report Selection Formula (Urgent)

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2002
    Posts
    94

    Resolved [RESOLVED] Crystal Report Selection Formula (Urgent)

    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:
    1. With crStudList
    2.         .Connect = strConn
    3.         .ReportFileName = App.Path & "\reports\StudentList.rpt"
    4.         .ReportTitle = "Student List"
    5.         .WindowTitle = "Student List"
    6.         .SelectionFormula = "{tblStudent.RegistrationDate}>=#" & dtpFrom.Value & "# and {tblStudent.RegistrationDate}<=#" & dtpTo.Value & "#"
    7.         .WindowState = crptMaximized
    8.         .Destination = crptToWindow
    9.         .Action = 1
    10.     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
    Last edited by damini_dd; Feb 15th, 2006 at 10:03 AM. Reason: to add vbcode tag

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width