Results 1 to 5 of 5

Thread: [RESOLVED] Runtime-time Error '20535'

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    4

    Resolved [RESOLVED] Runtime-time Error '20535'

    Hi everyone!

    I hope someone will help me on this.
    I'm using VB6, Crystal Report 8.5 , Microsoft Access 2003 and my OS is WinXP. I enable password for the database
    I'm really new with VB and really really hope that someone will give me the solution for my problem. I recieved this "Run-time error '20535:
    Error in File C:\Program Files\Microsoft Visual Studio\....\Outward1.rpt:
    Unable to connect: incorrect session parameters"


    here is some of the codes:

    on the 'view' command button:

    Code:
    Private Sub cmdView_Click()
         mnuView_Click
    
    End Sub
    for the mnuView_click :
    Code:
    Private Sub mnuView_Click()
            CrystalReport1.Destination = crptToWindow
            CrystalReport1.DataFiles(0) = App.Path & "\dbCustomer.mdb"
            CrystalReport1.ReportFileName = App.Path & "\Outward1.rpt"
            CrystalReport1.CopiesToPrinter = 1
            CrystalReport1.Password = "customerdatabase2006"
            CrystalReport1.WindowTitle = "Customer Management V1.0"
            CrystalReport1.WindowState = crptMaximized
            CrystalReport1.Action = 1
    End Sub
    Thank you in advance!!!

  2. #2
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Re: Runtime-time Error '20535'

    try..
    Code:
    Private Sub mnuView_Click()
            CrystalReport1.Destination = crptToWindow
            CrystalReport1.DataFiles(0) = App.Path & "\dbCustomer.mdb"
            CrystalReport1.Password = "customerdatabase2006"
            CrystalReport1.ReportFileName = App.Path & "\Outward1.rpt"
            CrystalReport1.CopiesToPrinter = 1
            CrystalReport1.WindowTitle = "Customer Management V1.0"
            CrystalReport1.WindowState = crptMaximized
            CrystalReport1.Action = 1
    End Sub

  3. #3
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Runtime-time Error '20535'

    If you only have a database password you need to use

    CrystalReport1.Password = chr$(10) & "db password"

    If you have user and database passwords use

    CrystalReport1.Password "user password " & Chr$(10) & "db password"

  4. #4

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    4

    Talking Re: Runtime-time Error '20535'

    Dear brucevde,


    Thank you so much for the help. It works for the program!!! And i can view my Crystal Report Thank you~!!!!!


    Best regards,
    silentd

  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    4

    Re: Runtime-time Error '20535'

    Thank you to VBFNewComer too Really appreciate your reply

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width