错误在开发机器上打开水晶报告

时间:2013-04-14 18:50:49

标签: asp.net-mvc visual-studio crystal-reports

我收到错误不支持的操作。尝试以编程方式显示Crystal Reports环境中开发的Crystal Report时,无法在C ++堆栈中打开由JRC引擎处理的文档。

我正在使用MS Visual Studio 2012并尝试发布我用于调用此报告的完整代码以及堆栈跟踪。问题出现在我的VS开发环境中。我在发布应用程序后发现了几个帖子和解决方案。我是Crystal Reports的新手,我无法找到一种方法来完成这项工作。它发生在负载点。

感谢您的帮助

rpt properties
Build Action: Content
Cope to Output Directory: Do not copy
Custom Tool: blank
Custom Tool Name: blank



Imports CrystalDecisions.CrystalReports.Engine
Public Class CrystalReportsController
    Inherits System.Web.Mvc.Controller

    Public Function EmployeeQuoteLanscape() As ActionResult
        Dim rptH As New ReportClass()
        rptH.FileName = Server.MapPath("~/Content/Reprots/Quote/EmployeeQuoteLandscape.rpt")
        rptH.Load()
        rptH.SetDataSource("")
        Dim stream As IO.Stream = rptH.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)
        Return File(stream, "application/pdf")
    End Function
End Class
应用程序中的服务器错误。

不支持的操作。由JRC引擎处理的文档无法在C ++堆栈中打开。

描述:执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息:System.Runtime.InteropServices.COMException:不支持的操作。由JRC引擎处理的文档无法在C ++堆栈中打开。

来源错误:

第6行:Dim rptH为新的ReportClass() 第7行:rptH.FileName = Server.MapPath(“〜/ Content / Reprots / Quote / EmployeeQuoteLandscape.rpt”) 第8行:rptH.Load() 第9行:rptH.SetDataSource(“”) 第10行:Dim stream As IO.Stream = rptH.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)

源文件:D:\ Visual Studio Projects \ GBIP \ gbip_new \ gbip_new \ Controllers \ CrystalReportsController.vb Line:8

堆栈追踪:

[COMException(0x80041811):不支持的操作。由JRC引擎处理的文档无法在C ++堆栈中打开。    CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath,Int32 Options)+0    CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath,Int32 Options)+138    CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()+ 546

[CrystalReportsException:加载报告失败。]    CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()+647    CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename,OpenReportMethod openMethod,Int16 parentJob)+1799    CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String reportName,OpenReportMethod openMethod,Int16 parentJob)+278    CrystalDecisions.CrystalReports.Engine.ReportClass.Load()+38    D:\ Visual Studio Projects \ GBIP \ gbip_new \ gbip_new \ Controllers \ CrystalReportsController.vb中的gbip_new.CrystalReportsController.EmployeeQuoteLanscape():8    lambda_method(Closure,ControllerBase,Object [])+102    System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller,Object []参数)+59    System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext,IDictionary 2 parameters) +435 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary 2个参数)+60    System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeSynchronousActionMethod(ControllerContext controllerContext,ActionDescriptor actionDescriptor,IDictionary 2 parameters) +50 System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +75 System.Web.Mvc.Async.<>c__DisplayClass8 1.b__7(IAsyncResult )+44    System.Web.Mvc.Async.WrappedAsyncResult 1.End() +139 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +102 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +49 System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +126 System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +323 System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +44 System.Web.Mvc.Async.WrappedAsyncResult 1.End()+139    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult,Object tag)+102    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)+50    System.Web.Mvc.Async。&lt;&gt; c _DisplayClass2a.b_ 20()+68    System.Web.Mvc.Async。&lt;&gt; c _DisplayClass25.b_ 22(IAsyncResult asyncResult)+184    System.Web.Mvc.Async.WrappedAsyncResult 1.End() +136 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +56 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +40 System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +40 System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +47 System.Web.Mvc.Async.WrappedAsyncResult 1.End()+151    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult,Object tag)+59    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult,Object tag)+40    System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)+44    System.Web.Mvc.Async。&lt;&gt; c _DisplayClass4.b__3(IAsyncResult ar)+47    System.Web.Mvc.Async.WrappedAsyncResult 1.End() +151 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +39 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +39 System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +45 System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +47 System.Web.Mvc.Async.WrappedAsyncResult 1.End()+151    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult,Object tag)+59    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult,Object tag)+40    System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)+40    System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)+38    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+9629296    System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean&amp; completedSynchronously)+155

版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本:4.0.30319.18034

1 个答案:

答案 0 :(得分:0)

“Reports”一词在您的文件路径中拼写错误。也许这就是问题?