Results 1 to 2 of 2

Thread: [Resolved] Logon failed for Crystal Report

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612

    [Resolved] Logon failed for Crystal Report

    I created a report called CigUnitsRpt.rpt. I then put the crviewer control on my web page and used the following code.

    VB Code:
    1. Imports CrystalDecisions.CrystalReports.Engine
    2. Imports CrystalDecisions.Shared
    3.  
    4. Public Class CigUnitsProcess
    5.     Inherits System.Web.UI.Page
    6.     Protected WithEvents CrystalReportViewer1 As CrystalDecisions.Web.CrystalReportViewer
    7.  
    8.     Dim crpt As CigUnitsRpt
    9.     Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
    10.     Dim myLogin As CrystalDecisions.Shared.TableLogOnInfo
    11.  
    12.     Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    13.         crpt = New CigUnitsRpt()
    14.         For Each myTable In crpt.Database.Tables
    15.             myLogin = myTable.LogOnInfo
    16.             myLogin.ConnectionInfo.Password = "password"
    17.             myLogin.ConnectionInfo.UserID = "user"
    18.             myTable.ApplyLogOnInfo(myLogin)
    19.         Next
    20.         CrystalReportViewer1.ReportSource = Server.MapPath("CigUnitsRpt.rpt")
    21.         If Not IsPostBack Then
    22.  
    23.         End If
    24.     End Sub
    25.  
    26. End Class

    I'm thinking it might not know where CigUnitsRpt.rpt is or something like that.

    Here is the error message I get.

    Logon failed.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [LogOnException: Logon failed.]
    .K(String 
    , EngineExceptionErrorID  )
    .F(Int16 , Int32 )
    .E(Int16 )
    CrystalDecisions.CrystalReports.Engine.FormatEngine.GetPage(PageRequestContext reqContext)
    CrystalDecisions.ReportSource.LocalReportSourceBase.GetPage(PageRequestContext pageReqContext)
    CrystalDecisions.Web.ReportAgent.v(Boolean `)
    CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e)
    System.Web.UI.Control.PreRenderRecursiveInternal()
    System.Web.UI.Control.PreRenderRecursiveInternal()
    System.Web.UI.Control.PreRenderRecursiveInternal()
    System.Web.UI.Page.ProcessRequestMain()
    Last edited by indydavid32; Nov 24th, 2003 at 02:36 PM.
    David Wilhelm

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