borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Edit a RPT in Runtime on VB.NET)Next Topic (I got a big problem.) New Topic New Poll Post Reply
AndreaVB Forum : Reporting tools : Unable to connect error
Poster Message
ghodoo
Level: Trainee

Registered: 30-03-2005
Posts: 1

icon 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  

30-03-2005 at 10:50 PM
View Profile Send Email to User Show All Posts | Quote Reply
Madhivanan
Level: Graduate

Registered: 02-05-2005
Posts: 10
icon Re: Unable to connect error

Open the Report and do verify Database

____________________________

Madhivanan

Failing to plan is Planning to fail

02-05-2005 at 11:10 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Reporting tools : Unable to connect error
Previous Topic (Edit a RPT in Runtime on VB.NET)Next Topic (I got a big problem.) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder