I am having a report(Crystal 10) with 7 sub reports and its working fine with Crystal Design mode, but if run this report from VB6.0 it is showing Logon Failure Error Database Vendor Code -30082. I Have DB2 Database as Backend. I think problem is with my code i.e.
Dim Crystal As CRAXDRT.Application
Dim Report As CRAXDRT.Report
Dim RECORD_SELECTION_FORMULA As String
CRViewer1.DisplayBorder = True
CRViewer1.DisplayTabs = True
Dim strProductOption As String
Dim StrItemFrom As String
Dim StrItemTo As String
Me.MousePointer = fmMousePointerHourGlass
CRViewer1.EnableDrillDown = False
CRViewer1.EnableRefreshButton = False
CRViewer1.EnableProgressControl = True
Set Crystal = New CRAXDRT.Application
If UserForm1.radioAll.Value = True Then
strProductOption = "All"
ElseIf UserForm1.radioAssembly.Value = True Then
strProductOption = "Assembly"
Else
strProductOption = "Spares"
End If
Set Report = Crystal.OpenReport("C:\Documents and Settings\adityas.WMICOMBLR.000\Desktop\Heijunka\Heijunka Plan.rpt")
Report.Database.LogOnServer "P2SODBC.dll", "DBLIVE", "DBLIVE", "Db2admin", "
Db2admin"
Report.DiscardSavedData
' Disabling The Parameter Prompting
Report.EnableParameterPrompting = False
Report.ParameterFields(1).AddCurrentValue Val((Format(UserForm1.dtpPlanStartDate.Value, "YYYYMMDD")))
Report.ParameterFields(2).AddCurrentValue Val((Format(UserForm1.dtpPlanEndDate.Value, "YYYYMMDD")))
Report.ParameterFields(3).AddCurrentValue strProductOption
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Any body with Suggestion or Solutions Please