469,928 Members | 1,875 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,928 developers. It's quick & easy.

Logon Failed with Crystal Reports and VB.NET

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
Jul 21 '05 #1
0 4884

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Rey | last post: by
2 posts views Thread by Karun Karunakaran | last post: by
2 posts views Thread by GFro | last post: by
1 post views Thread by andy lim | last post: by
3 posts views Thread by Milan Todorovic | last post: by
9 posts views Thread by mollyf | last post: by
19 posts views Thread by Michael O'Donnell | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.