-
Sep 3rd, 2012, 03:59 AM
#1
Thread Starter
Member
[RESOLVED] Listview to crystal reports 9
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..
-
Sep 3rd, 2012, 12:10 PM
#2
Re: Listview to crystal reports 9
Try:
Code:
.RecordSelectionFormula = "{tblLog.LogIn} in CDate(" & date1 & ") to CDate(" & date2 & ")"
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
-
Sep 12th, 2012, 10:30 PM
#3
Thread Starter
Member
Re: Listview to crystal reports 9
thanks sir! this works too!
.RecordSelectionFormula = "{tblLog.LogIn} in '" & DateValue(date1) & "' to '" & DateValue(date2) & "'"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|