PDA

Click to See Complete Forum and Search --> : CR 8.5 type mismatch help!


Trickymonk
Mar 10th, 2006, 09:47 AM
I have some existing code that now fails after upgrading to CR 8.5 (these are old reports!). I know VB but next to nothing about CR. Any help is much appreciated. The offending code is below:

Dim Report As New CrystalReport1
Dim CommSub As SubreportObject

Option Explicit

Private Sub Form_Load()
Dim SQL As String
Dim SQL2 As String
Dim x As Integer

Screen.MousePointer = vbHourglass
-->Set CommSub = Report.Details<-- this FAILS!!!


Thanks

Jeff

GaryMazzone
Mar 10th, 2006, 10:09 AM
Details is not a Subreport type. It is a section type

Trickymonk
Mar 10th, 2006, 10:19 AM
I should have posted the rest of the code:

Set CommSub = Report.Details
CommSub.OpenSubreport.Database.SetDataSource AdoSub.Recordset, 3, 1

Since Details is a section, how should the OpenSubreport function be handled? Are different versions of CR this unique?

Thanks!