I have a VB6 application using CR 8.5 and when I call the forms CRViewer1.ReportSource = CRReport function, the ReportSource is still equal to nothing when it is finished. I have checked that the CRReport object is not equal to nothing and that the form and the CRViewer1 objects are not equal to nothing. It does not make any sense. I use the same code in another program and it works just fine, but not in this one.

Here is a sample of the code that I use:

dim iRS as ADODB.Recordset
set iRS = [DataConnect object].GetDisconnectedRecordset("SELECT * FROM tblItemsReportFormat") '--this function just returns a disconnected recordset from the already connected datasource within the program

dim oRpt as CRRptLouver '-- the CR Report
set oRpt = new CRRptLouver

dim crItems as CRAXDDRT.Report
set crItems = oRpt.OpenSubreport("rptItems")
crItems.Database.SetDataSource iRS,3,1

dim rptForm as frmReport
set rptForm = new frmReport

rptForm.CRViewer1.ReportSource = oRpt '--Here is where the issue is