Altaf Patni
asked on
RunTime Error 20525 "Unable to Load Report"
I have build crystal report in my project.
from vb6 form i am using following code to display report, but getting RunTime Error 20525 "Unable to Load Report"
and highlighted on ".Action = 0"
from vb6 form i am using following code to display report, but getting RunTime Error 20525 "Unable to Load Report"
and highlighted on ".Action = 0"
Set Rs = Nothing
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from RawStock where SleePDate between '" & DTPickerFrom.Value & "' AND '" & DTPickerTo.Value & "'", con, adOpenKeyset, adLockOptimistic
If Rs.RecordCount > 0 Then
With CrystalReport1
.ReportFileName = App.Path & "\CrystalReport1.Dsr"
.Connect = "DSN=crystal;UID=crystal;PWD=crystalABC;DSQ=cryst"
.DiscardSavedData = True
.Destination = crptToWindow
.Action = 0
End With
End If
ASKER
changed to .rpt
still same problem
still same problem
ASKER
one more thing how to bind record set ( RS ) with CrystalReport1.rpt
is it ok if i will use following line of code
is it ok if i will use following line of code
CrystalReport1.SQLQuery = "Select * from RawStock where SleePDate between '" & DTPickerFrom.Value & "' AND '" & DTPickerTo.Value & "'"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
mlmcc