Crystal - Version 8.5
VB - Version 6.0
Can anyone tell me why I get a subscript out of range error everytime I try to set the data source in vb to a report created using the designer with unbound fields. I have the exact number of fields in the report that the table contains. The datatype has been double checked and it is the same. I even put them onto the report in the exact order as the SQL SELECT statement. Confused??
rsData is a ADODB.Recordset - the SQL statement works fine
With rsData
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
.Source = strSQL
.ActiveConnection = cnnTest
.Open
.ActiveConnection = Nothing
End With
Report.Database.SetDataSource rsData, 3, 1
"WILL NOT GO PAST THIS LINE OF CODE"
Report.AutoSetUnboundFieldSource crBMTNameAndValue
Load CRViewer1
CRViewer1.Show
VB - Version 6.0
Can anyone tell me why I get a subscript out of range error everytime I try to set the data source in vb to a report created using the designer with unbound fields. I have the exact number of fields in the report that the table contains. The datatype has been double checked and it is the same. I even put them onto the report in the exact order as the SQL SELECT statement. Confused??
rsData is a ADODB.Recordset - the SQL statement works fine
With rsData
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
.Source = strSQL
.ActiveConnection = cnnTest
.Open
.ActiveConnection = Nothing
End With
Report.Database.SetDataSource rsData, 3, 1
"WILL NOT GO PAST THIS LINE OF CODE"
Report.AutoSetUnboundFieldSource crBMTNameAndValue
Load CRViewer1
CRViewer1.Show