Hi,
I am getting the following error running a crystal report
with VB.NET
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.]
.K(String
, EngineExceptionErrorID )
.F(Int16 , Int32 )
.E(Int16 )
CrystalDecisions.CrystalReports.Engine.FormatEngin e.GetPag
e(PageRequestContext reqContext)
CrystalDecisions.ReportSource.LocalReportSourceBas e.GetPag
e(PageRequestContext pageReqContext)
CrystalDecisions.Web.ReportAgent.v(Boolean `)
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()
I get the error when running report1 as a web
application. The same report when run as a windows
application runs without any problems.
I ran another sample report as a web application which
just retrieves information from a table in our datatabase
and it ran fine.
The only thing I change while running report1 is change
the table name and report reference.
The difference between the 2 reports is that report1 has
Grouping fields and sample does not. Rest everything is
the same between the 2 runs.
I don't know why I am getting this error. Can anybody
please shed some light on this?
Not much code inside the webform.
InitializeComponent()
''Create an instance of the strongly-typed report object
crReportDocument = New CrystalReport1()
'' Create a new instance of the tablelogoninfos class
which contains
''the tablelogoninfo objects for each table in the
report
crTableLogonInfos = New TableLogOnInfos()
''Create a new instance of the TableLogonInfo
class which contains
''the connection information for each table
crTableLogonInfo = New TableLogOnInfo()
''Set the connection properties
crConnectionInfo = New ConnectionInfo()
With crConnectionInfo
.ServerName = "DEV"
.DatabaseName = "Taos"
.UserID = "sa"
.Password = ""
End With
crTableLogonInfo.ConnectionInfo = crConnectionInfo
crTableLogonInfo.TableName = "Report_StdDemoA"
crTableLogonInfos.Add(crTableLogonInfo)
CrystalReportViewer1.LogOnInfo = crTableLogonInfos
CrystalReportViewer1.ReportSource =
crReportDocument
Thanks a lot in advance....
-Ambika