I have a report that was working fine until I added a field to the stored procedure which populates the dataset upon which the report is based. Updating the table within the dataset went Ok. Updating the report design time datasource to see the new field seemed
to go ok. But now the report is giving me a log on error. The report itself should not be logging on anywhere as its datasource is an ASP.Net dataset. Here is the code and error message I am getting. Any help would be appreciated. In the past, the only way
I could fix this is delete the report and start all over again. This is getting to time consuming. Plus everytime I make a minor change to the report, I live in fear it will be made useless by this error.
Public Class rptCourtRegister
Inherits System.Web.UI.Page
Protected WithEvents daCourtRegister As System.Data.SqlClient.SqlDataAdapter
Protected WithEvents daCourtRegisterSel As System.Data.SqlClient.SqlCommand
Protected WithEvents rptvCourtRegister As CrystalDecisions.Web.CrystalReportViewer
Protected WithEvents daClaimClasses As System.Data.SqlClient.SqlDataAdapter
Protected WithEvents daClaimClassesSel As System.Data.SqlClient.SqlCommand
Protected WithEvents DsCourtRegister1 As BRMS_Reports.dsCourtRegister
Protected WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
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
End Sub
Private Sub rptvCourtRegister_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles rptvCourtRegister.Load
Me.daCourtRegister.SelectCommand.Parameters("@DebtorOrg_ID").Value = Session("Client_ID")
Me.daCourtRegister.Fill(DsCourtRegister1)
Me.daClaimClasses.SelectCommand.Parameters("@DebtorOrg_ID").Value = Session("Client_ID")
Me.daClaimClasses.Fill(DsCourtRegister1)
Dim rpt As New CourtRegisterAlpha()
rpt.SetDataSource(DsCourtRegister1)
rptvCourtRegister.ReportSource = rpt
End Sub
End Class
Server Error in '/BRMS-Reports' Application.
-------------------------------------------------------------------------------- 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.] .J(String , EngineExceptionErrorID ) +506 .E(Int16 , Int32 ) +537 CrystalDecisions.CrystalReports.Engine.FormatEngine.GetPage(PageRequestContext
reqContext) +539 CrystalDecisions.ReportSource.LocalReportSourceBase.GetPage(PageRequestContext pageReqContext) +189 CrystalDecisions.Web.ReportAgent.v(Boolean `) +150 CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e) +108 System.Web.UI.Control.PreRenderRecursiveInternal()
+62 System.Web.UI.Control.PreRenderRecursiveInternal() +125 System.Web.UI.Control.PreRenderRecursiveInternal() +125 System.Web.UI.Page.ProcessRequestMain() +1470 -------------------------------------------------------------------------------- Version Information:
Microsoft .NET Framework Version:1.0.3705.288; ASP.NET Version:1.0.3705.288
I was able to duplicate the exact change that produce the error. When you modify the underlying dataset (such as add a field), the change is not immediately reflected the field explorer (apparently the dataset schema is not updated in the report). When I go
to . . . Set Location Replace (just replace the current dataset table with itself) Now the field explorer shows the added the field, but the long on failure now occurs. Bill
wrlucas
Member
355 Points
82 Posts
The dreaded, random LogOn failure
Sep 24, 2003 06:05 PM|LINK
Public Class rptCourtRegister Inherits System.Web.UI.Page Protected WithEvents daCourtRegister As System.Data.SqlClient.SqlDataAdapter Protected WithEvents daCourtRegisterSel As System.Data.SqlClient.SqlCommand Protected WithEvents rptvCourtRegister As CrystalDecisions.Web.CrystalReportViewer Protected WithEvents daClaimClasses As System.Data.SqlClient.SqlDataAdapter Protected WithEvents daClaimClassesSel As System.Data.SqlClient.SqlCommand Protected WithEvents DsCourtRegister1 As BRMS_Reports.dsCourtRegister Protected WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection 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 End Sub Private Sub rptvCourtRegister_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles rptvCourtRegister.Load Me.daCourtRegister.SelectCommand.Parameters("@DebtorOrg_ID").Value = Session("Client_ID") Me.daCourtRegister.Fill(DsCourtRegister1) Me.daClaimClasses.SelectCommand.Parameters("@DebtorOrg_ID").Value = Session("Client_ID") Me.daClaimClasses.Fill(DsCourtRegister1) Dim rpt As New CourtRegisterAlpha() rpt.SetDataSource(DsCourtRegister1) rptvCourtRegister.ReportSource = rpt End Sub End ClassServer Error in '/BRMS-Reports' Application. -------------------------------------------------------------------------------- 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.] .J(String , EngineExceptionErrorID ) +506 .E(Int16 , Int32 ) +537 CrystalDecisions.CrystalReports.Engine.FormatEngine.GetPage(PageRequestContext reqContext) +539 CrystalDecisions.ReportSource.LocalReportSourceBase.GetPage(PageRequestContext pageReqContext) +189 CrystalDecisions.Web.ReportAgent.v(Boolean `) +150 CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e) +108 System.Web.UI.Control.PreRenderRecursiveInternal() +62 System.Web.UI.Control.PreRenderRecursiveInternal() +125 System.Web.UI.Control.PreRenderRecursiveInternal() +125 System.Web.UI.Page.ProcessRequestMain() +1470 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.0.3705.288; ASP.NET Version:1.0.3705.288wrlucas
Member
355 Points
82 Posts
Re: The dreaded, random LogOn failure
Sep 24, 2003 06:32 PM|LINK