Hello everybody,
I am using Crystal Report in my ASP.NET application. If I try to open the report with Crystal Viewer on my WEB page I am getting this error:
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.LogOnExcept ion: 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.]
.F(String , EngineExceptionErrorID
)
.A(Int16 , Int32 )
.@(Int16 )
CrystalDecisions.CrystalReports.Engine.FormatEngin e.GetPage(PageRequestContext reqContext)
CrystalDecisions.ReportSource.LocalReportSourceBas e.GetPage(PageRequestContext pageReqContext)
CrystalDecisions.Web.ReportAgent.u(Boolean N)
CrystalDecisions.Web.CrystalReportViewer.OnPreRend er(EventArgs e)
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Page.ProcessRequestMain()
My code behind is:
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
If Session("ReportName") = "rptNonUpdatedRecords" Then
Dim crpt As rptNonUpdatedRecords
crpt = New rptNonUpdatedRecords
For Each myTable In crpt.Database.Tables
myLogin = myTable.LogOnInfo
myLogin.ConnectionInfo.ServerName = "GRAND01"
myLogin.ConnectionInfo.DatabaseName = "D:\HAB_WEB\HABDatabases\HAB_LOGIN.mdb"
myLogin.ConnectionInfo.Password = ""
myLogin.ConnectionInfo.UserID = ""
myTable.ApplyLogOnInfo(myLogin)
Next
CrystalReportViewer1.ReportSource = Server.MapPath("rptNonUpdatedRecords.rpt")
'CrystalReportViewer1.DataBind()
End If
End Sub
I am using an Access 2000 database to fit data for the reports, no User Id, no Passwords. What am I doing wrong or missing?
Please help!!!!!
-Dmitriy
