簡體   English   中英

在開發機上打開水晶報告時出錯

[英]error opening a crystal report on development machine

我收到錯誤“不支持的操作”。 嘗試以編程方式顯示在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.COM異常:不支持的操作。 JRC引擎處理的文檔無法在C ++堆棧中打開。

源錯誤:

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

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

堆棧跟蹤:

[COMException(0x80041811):不支持的操作。 由JRC引擎處理的文檔無法在C ++堆棧中打開。] CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object&DocumentPath,Int32選項)+0 CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object&DocumentPath,Int32選項)+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(字符串reportName,OpenReportMethod openMethod,Int16 parentJob)+278 CrystalDecisions.CrystalReports.Engine.ReportClass.Load()+38 gbip_new.CrystalReportsController.EmployeeQuoteLanscape()在D:\\ Visual Studio Projects \\ GBIP \\ gbip_new \\ gbip_new \\ Controllers \\ CrystalReportsController。 :8 lambda_method(Closure,ControllerBase,Object [])+102 System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase控制器,Object []參數)+59 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext,IDictionary 2 parameters) +435 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, 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.AsyncResultW rapper.End(IAsyncResult asyncResult,Object標記)+102 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)+50 System.Web.Mvc.Async。<> c _DisplayClass2a.b_ 20()+68系統。 Web.Mvc.Async。<> 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,對象標記)+40 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)+4 4 System.Web.Mvc.Async。<> 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標簽)+40 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)+40 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProc essRequest(IAsyncResult結果)+38 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+9629296 System.Web.HttpApplication.ExecuteStep(IExecutionStep步驟,布爾值且已完成)+155

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

您的文件路徑中的單詞“ Reports”拼寫錯誤。 也許那是問題所在?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM