ghodoo Level: Trainee
 Registered: 30-03-2005 Posts: 1
|
Unable to connect error
Hi all,
I am new to crystal reports. I am trying to connect VB 6.0 to open an existing crystal report file, but an error message appears as follows:
run-time error '20535'
Error in file ... :
Unable to connect: incorrect session parameters. |
the report contains sub-report and the database used is Ms Access. The database is secured with a password. Here is the code that I used in VB:
Private Sub cmdtype_Click()
crp.ReportFileName = App.Path & "\rptPersonal.rpt"
crpCV.SelectionFormula = Trim("{Lang.Key}=") & Val(Key)
crp.DataFiles(0) = App.Path & Trim("\mydb.mdb")
crp.Connect = "PWD=12345"
crp.Destination = crptToWindow
crp.WindowState = crptMaximized
crp.Action = 1
End Sub |
So what should I do to solve this problem? Note: when I used the same code to open a report that doesn't have subreport in it, the report is displayed correctly .
Reguards
|