
Error when displaying a report in ASP.Net
I get the following error when displayinig a report in the CrystalReport
Viewer. If I use a dataset in the report I get the error otherwise it works.
Specified cast is not valid.
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: System.InvalidCastException: Specified cast is not valid.
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:
[InvalidCastException: Specified cast is not valid.]
CrystalDecisions.Shared.ReportStateInfo..ctor(ReportStateInfo
reportStateInfo) +186
CrystalDecisions.Shared.RequestContext..ctor(RequestContext
requestContext) +166
CrystalDecisions.Shared.ReportPageRequestContext..ctor(ReportPageRequestCont
ext requestContext) +30
CrystalDecisions.Shared.PageRequestContext..ctor(PageRequestContext
pageRequestContext) +22
CrystalDecisions.Web.ReportAgent.{(Boolean E) +189
CrystalDecisions.Web.CrystalReportViewer.OnPreRender(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() +1470
----------------------------------------------------------------------------
----
Version Information: Microsoft .NET Framework Version:1.0.3705.288; ASP.NET
Version:1.0.3705.288