crystal report problem

aditya12c

Active member
Joined
Aug 21, 2005
Messages
26
Programming Experience
Beginner
HTML:
Dim a As New Form2
Dim date1 As Date = "1/1/1900"
Dim Fltr
a.CrystalReportViewer1.ReportSource = "C:\crystal\crystalreport2.rpt"
RadioButton2.Checked Then
Fltr = "{Employee.emp_DOB}=" & (date1) & " "
a.CrystalReportViewer1.SelectionFormula = (Fltr)
a.Show()
End If

this is giving me error saying
error in formula selection
Employee.emp_DOB=1/1/1900
DateTime required
i am using SQL as backend... where there is only datetime as datatype
i even tried this in above code still output same
i changed
Dim date1 As string = "1/1/1900 12:00:00 AM"
1/1/1900 12:00:00 AM is what showing in my backend
please tell me the solution..
 
Let's discuss several things:
1/1/1900 is the value for null in a DateTime field, why would you have a selection formula based on a null value?

There is an option in crystal reports to convert DateTime to Date format. Report -> Report Options. Have you tried any variations of that?

Have you looked into passing the report a parameter(s) and using the parameters in the selection formula?
http://www.vbdotnetforums.com/showthread.php?t=9461

I guess in order to answer your question more correctly I need to know what the report is trying to do and which records you are trying to select.
 
Back
Top