good day! I'm now working on a project with a daily report. i managed to create some codes but i can't get it working it has an error saying "ERROR IN COMPILING SQL EXPRESSION : UNKNOWN QUERY ENGINE ERROR."
Here is my code for the Crystal Query:
<code>
Dim rpt As CRAXDDRT.Report
Dim rptApp As New CRAXDDRT.Application
Dim date1 As String
Dim date2 As String
date1 = Format(DTPicker1.Value, "yyyy,mm,dd")
date2 = Format(DTPicker2.Value, "yyyy,mm,dd")
Set rpt = New CRAXDDRT.Report
Set rpt = rptApp.OpenReport(App.Path & "\LogReport.rpt")
With rpt
.RecordSelectionFormula = "{tblLog.LogIn} in '" & DateValue(date1) & "' to '" & DateValue(date2) & "'"
end with
</code>
what is wrong with it? Please give me some advice bout this. Thanks in advance.. :)
Here is my code for the Crystal Query:
<code>
Dim rpt As CRAXDDRT.Report
Dim rptApp As New CRAXDDRT.Application
Dim date1 As String
Dim date2 As String
date1 = Format(DTPicker1.Value, "yyyy,mm,dd")
date2 = Format(DTPicker2.Value, "yyyy,mm,dd")
Set rpt = New CRAXDDRT.Report
Set rpt = rptApp.OpenReport(App.Path & "\LogReport.rpt")
With rpt
.RecordSelectionFormula = "{tblLog.LogIn} in '" & DateValue(date1) & "' to '" & DateValue(date2) & "'"
end with
</code>
what is wrong with it? Please give me some advice bout this. Thanks in advance.. :)