Hey,
I'm super stuck. I have been trying to get a web application for web reporting off the ground. Right now I would be happy if I could get any report to run - but cannot. As I have played with the code and searched for information on-line, the two error messages I am getting are Logon failed and Load Report Failed. I created a crystal report using the expert in the .net environment and added it to the project. Then I use this code to try and display the report:
Private Sub logonInfo()
Dim oRpt As New ReportDocument
Dim crLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
requiredReport = Session("ReportName"
oRpt.Load(requiredReport, 1)
crLogonInfo = oRpt.Database.Tables(0).LogOnInfo
crLogonInfo.ConnectionInfo.ServerName = "ERMDSQLSERVER"
crLogonInfo.ConnectionInfo.UserID = "S"
crLogonInfo.ConnectionInfo.Password = "mb"
crLogonInfo.ConnectionInfo.DatabaseName = "MD"
oRpt.Database.Tables(0).ApplyLogOnInfo(crLogonInfo)
crystal.ReportSource = oRpt
crystal.DataBind()
End Sub
This is the error message I receive when I attempt to load the report (this line of code - oRpt.Load(requiredReport, 1)
I also noted tyhrough the watch windoe that when the report document is declared, the properties (database, DataDefinitions, ExportOptions, FormatEngine, HasSavedData, RecordSelectionFormula, ReportDefinition, ReportOptions, SummaryInfo) all have a value of
<error: an exception of type: {CrystalDecisions.CrystalReports.Engine.LoadSaveReportException} occurred>
Can anybody help me just get this at least running. I just keep wasting time and hitting my head against the wall
Load report 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.LoadSaveReportException: Load report failed.
Source Error:
Line 77:
Line 78: requiredReport = Session("ReportName"
Line 79: oRpt.Load(" '" & requiredReport & "' ", 1)
Line 80:
Line 81: crLogonInfo = oRpt.Database.Tables(0).LogOnInfo
Source File: c:\inetpub\ Line: 79
Stack Trace:
[LoadSaveReportException: Load report failed.]
.F(String , EngineExceptionErrorID
)
.B(String , Int32 )
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob)
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String reportName, OpenReportMethod openMethod)
Reports.ViewReport.logonInfo() in c:\inetpub\ Reports.ViewReport.Page_Load(Object sender, EventArgs e) in c:\inetpub\ System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
I'm super stuck. I have been trying to get a web application for web reporting off the ground. Right now I would be happy if I could get any report to run - but cannot. As I have played with the code and searched for information on-line, the two error messages I am getting are Logon failed and Load Report Failed. I created a crystal report using the expert in the .net environment and added it to the project. Then I use this code to try and display the report:
Private Sub logonInfo()
Dim oRpt As New ReportDocument
Dim crLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
requiredReport = Session("ReportName"
oRpt.Load(requiredReport, 1)
crLogonInfo = oRpt.Database.Tables(0).LogOnInfo
crLogonInfo.ConnectionInfo.ServerName = "ERMDSQLSERVER"
crLogonInfo.ConnectionInfo.UserID = "S"
crLogonInfo.ConnectionInfo.Password = "mb"
crLogonInfo.ConnectionInfo.DatabaseName = "MD"
oRpt.Database.Tables(0).ApplyLogOnInfo(crLogonInfo)
crystal.ReportSource = oRpt
crystal.DataBind()
End Sub
This is the error message I receive when I attempt to load the report (this line of code - oRpt.Load(requiredReport, 1)
I also noted tyhrough the watch windoe that when the report document is declared, the properties (database, DataDefinitions, ExportOptions, FormatEngine, HasSavedData, RecordSelectionFormula, ReportDefinition, ReportOptions, SummaryInfo) all have a value of
<error: an exception of type: {CrystalDecisions.CrystalReports.Engine.LoadSaveReportException} occurred>
Can anybody help me just get this at least running. I just keep wasting time and hitting my head against the wall
Load report 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.LoadSaveReportException: Load report failed.
Source Error:
Line 77:
Line 78: requiredReport = Session("ReportName"
Line 79: oRpt.Load(" '" & requiredReport & "' ", 1)
Line 80:
Line 81: crLogonInfo = oRpt.Database.Tables(0).LogOnInfo
Source File: c:\inetpub\ Line: 79
Stack Trace:
[LoadSaveReportException: Load report failed.]
.F(String , EngineExceptionErrorID
)
.B(String , Int32 )
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob)
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String reportName, OpenReportMethod openMethod)
Reports.ViewReport.logonInfo() in c:\inetpub\ Reports.ViewReport.Page_Load(Object sender, EventArgs e) in c:\inetpub\ System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()