jcmyers
asked on
crystal reports 8, subreports, visual basic 6
Hello,
I have a Visual Basic 6 application calling a crystal report version 8 with a subreport. When attempting to invoke the crystal report it errors with "can not open SQL server - 20599." I have other crystal reports without subreports that work fine in the same application. The code is as follows:
Private Sub cmdSummary_Click()
Dim ODBC_String As String
On Error GoTo ErrorHandler
ODBC_String = "DSN=btireports.dsn;DSQ=" & pubstrDatabase & ";UID=bti;PWD=zoe"
crpReports.Connect = ODBC_String
If Me.cboDepartment <> "All" Then
crpReports.StoredProcParam (0) = Mid(Me.cboDepartment, 1, 7)
Else
crpReports.StoredProcParam (0) = Me.cboDepartment
End If
crpReports.ReportFileName = pubstrReportLocation & "ConsolidatedDeptDivLevelQ uarterly.r pt"
crpReports.Action = 1
GoTo ExitSub
ErrorHandler:
MsgBox "Printing Summary Report: " & Err.Description & " Error # " & Err.Number
ExitSub:
End Sub
Any help on why subreports do not work correctly in this context would be greatly appreciated.
Thanks,
Joe
I have a Visual Basic 6 application calling a crystal report version 8 with a subreport. When attempting to invoke the crystal report it errors with "can not open SQL server - 20599." I have other crystal reports without subreports that work fine in the same application. The code is as follows:
Private Sub cmdSummary_Click()
Dim ODBC_String As String
On Error GoTo ErrorHandler
ODBC_String = "DSN=btireports.dsn;DSQ=" & pubstrDatabase & ";UID=bti;PWD=zoe"
crpReports.Connect = ODBC_String
If Me.cboDepartment <> "All" Then
crpReports.StoredProcParam
Else
crpReports.StoredProcParam
End If
crpReports.ReportFileName = pubstrReportLocation & "ConsolidatedDeptDivLevelQ
crpReports.Action = 1
GoTo ExitSub
ErrorHandler:
MsgBox "Printing Summary Report: " & Err.Description & " Error # " & Err.Number
ExitSub:
End Sub
Any help on why subreports do not work correctly in this context would be greatly appreciated.
Thanks,
Joe
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Comment from ebolek
Date: 10/07/2004 02:07PM PDT
explains how to make the runtime customizations that the user asked in vb6 there fore suggest points to ebolek
Thanks
Emre
Date: 10/07/2004 02:07PM PDT
explains how to make the runtime customizations that the user asked in vb6 there fore suggest points to ebolek
Thanks
Emre
-dave