Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed


Message #1 by "vadim zabejinsky" <z__vadim@y...> on Thu, 23 Jan 2003 15:01:33
I'm working with Oracle9 on WindowsXP platform
When I try to run CrystalReportViewer, I get this message
CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed
I tried all the options that I found in FAQ's and didn't solve
the problem
May anybody help me?

Here is my code:

Imports CrystalDecisions.CrystalReports.Engine
    Dim oRpt As New ReportDocument()

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        Dim strReportFileName As String
        strReportFileName = "ListBaalMn.rpt"
        oRpt.Load("c:\inetpub\wwwroot\ProWebApplication\TestConnection\" 
+ strReportFileName)
        LogOn()

        ListBaalView.ReportSource = oRpt
        ListBaalView.DataBind()
    End Sub


    Private Sub LogOn()
        'for 
        Dim crLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
        crLogonInfo = oRpt.Database.Tables(0).LogOnInfo
        crLogonInfo.ConnectionInfo.ServerName = "yuav"
        crLogonInfo.ConnectionInfo.UserID = "magic8"
        crLogonInfo.ConnectionInfo.Password = "magic8"
        crLogonInfo.ConnectionInfo.DatabaseName = "discotes"
        oRpt.Database.Tables(0).ApplyLogOnInfo(crLogonInfo)
    End Sub

  Return to Index