Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load Report Failed - Logon failed

Status
Not open for further replies.

majordog

Programmer
Jul 8, 2002
222
0
0
CA
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(&quot;ReportName&quot;)
Line 79: oRpt.Load(&quot; '&quot; & requiredReport & &quot;' &quot;, 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()
 
Hi There
I have exactly the same problem
Can't stand it any more

Do You know a way out by now ?
Regards
TJ
 
All my reports, I logged onto the database with a report only user - user name and no password. That way I didn't have to programmically log onto the database every time I launched a report.

Also, if this is not your problem - really verify what values you are using for the report path. Generally that type of error is generated because the path is incorrect.

Hope this helps.
 
Most probably, you forgot "Server.MapPath(...)" in "oRpt.Load(...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top