Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
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.]
.F(String  , EngineExceptionErrorID 
)
.A(Int16 , Int32 )
.@(Int16 )
CrystalDecisions.CrystalReports.Engine.FormatEngine.GetPage(PageRequestContext reqContext)
CrystalDecisions.ReportSource.LocalReportSourceBase.GetPage(PageRequestContext pageReqContext)
CrystalDecisions.Web.ReportAgent.u(Boolean N)
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()
 
what may be the solution??
Posted 13-Feb-13 1:54am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

this problem may come if your Server Name / Database Name is different from what u have selected at design time
 
To solve this problem-
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine
 
Public Shared Sub Sub_CRCrystalLogon(ByRef rpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
 
''CrystalReport1' must be the name the CrystalReport

Dim crTableLogOnInfo As TableLogOnInfo = New TableLogOnInfo
 
Dim crConnectionInfo As ConnectionInfo = New ConnectionInfo
 
'Crystal Report Properties

Dim crDatabase As CrystalDecisions.CrystalReports.Engine.Database
 
Dim crTables As CrystalDecisions.CrystalReports.Engine.Tables
 
Dim crTable As CrystalDecisions.CrystalReports.Engine.Table
 
'Then, use following code sample to add the logic in the Page_Load method of your Web Form:

crConnectionInfo.ServerName = Server Name
 
crConnectionInfo.DatabaseName = DataBaseName
 
crConnectionInfo.UserID = DBUserID
 
crConnectionInfo.Password = DBPassword
 
crDatabase = rpt.Database
 
crTables = crDatabase.Tables
 
For Each crTable In crTables
 
crTableLogOnInfo = crTable.LogOnInfo
 
crTableLogOnInfo.ConnectionInfo = crConnectionInfo
 
crTable.ApplyLogOnInfo(crTableLogOnInfo)
 
Next
 
End Sub
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 404
1 Nirav Prabtani 389
2 Abhinav S 210
3 PIEBALDconsult 160
4 Dave Kreskowiak 155
0 OriginalGriff 7,580
1 Sergey Alexandrovich Kryukov 6,806
2 Maciej Los 3,919
3 Peter Leow 3,693
4 CHill60 2,742


Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 13 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100