BiggerBrother
Technical User
I've used the following code to pass the ADO recordset to the report, but, at the moment, it fowls on the first line of the form load code:
Dim CrAppl As CRAXDRT.application
Dim CrRep As CRAXDRT.Report
Dim AdoRs As ADODB.Recordset
Private Sub Form_Load()
Set CrRep = CrAppl.OpenReport("C:\temp\adors.rpt") 'error here!
CrRep.Database.Tables(1).SetDataSource AdoRs, 3
CrViewer1.ReportSource = CrRep
CrViewer1.ViewReport
End Sub
The returned error is "object or with block not set".
Why would this be? I've tried a couple of reports, and various sql statements for the recordset with no luck. Obviously, I'm missing something, it's just what?
Many thanks
BB
Dim CrAppl As CRAXDRT.application
Dim CrRep As CRAXDRT.Report
Dim AdoRs As ADODB.Recordset
Private Sub Form_Load()
Set CrRep = CrAppl.OpenReport("C:\temp\adors.rpt") 'error here!
CrRep.Database.Tables(1).SetDataSource AdoRs, 3
CrViewer1.ReportSource = CrRep
CrViewer1.ViewReport
End Sub
The returned error is "object or with block not set".
Why would this be? I've tried a couple of reports, and various sql statements for the recordset with no luck. Obviously, I'm missing something, it's just what?
Many thanks
BB