Hi everyone.
I'm trying to load a Crystal Report into a
vb.net page. I have a reportviewer on the aspx page and I have the following code:
Public Class TyDet
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Protected WithEvents ReportViewer As CrystalDecisions.Web.CrystalReportViewer
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
ReportViewer.DataBind()
End Sub
#End Region
In addition, I have set the databinding to the name of the report which is also located on the server. It shows up in design view, but once it is executed, it gives this error:
Server Error in '/CPS' Application.
--------------------------------------------------------------------------------
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.LoadSaveRep ortException: Load report 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:
[LoadSaveReportException: Load report failed.]
CrystalDecisions.Web.ReportAgentBase.m() +280
CrystalDecisions.Web.ReportAgent.get_RequestContex t() +10
CrystalDecisions.Web.ReportAgent.get_() +4
CrystalDecisions.Web.ReportAgent.{(Boolean C) +81
CrystalDecisions.Web.CrystalReportViewer.OnPreRend er(EventArgs e) +143
System.Web.UI.Control.PreRenderRecursiveInternal() +62
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Page.ProcessRequestMain() +1499
Can someone please tell me what the problem is? Thank you.