gpt4 book ai didi

c# - 报告应用程序服务器失败

转载 作者:太空宇宙 更新时间:2023-11-03 14:59:40 25 4
gpt4 key购买 nike

我试图在 Crystal 报表中输入一个与其编辑掩码不匹配的参数值。它会抛出 Report Application server failed 错误。有没有办法捕获这个异常并抛出一个用户可以理解的异常。问题是堆栈跟踪不显示我的代码的任何部分。顺便说一句,我的代码是用 .net 编写的

System.Runtime.InteropServices.COMException: The Report Application Server failed        at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.GetParamPromptingInfo(PromptingRequestInfo promptingRequestInfo, Object& promptingUnits, Object& promptingInfoProvider) : Line 0        at CrystalDecisions.ReportSource.EromReportSourceBase.DoParameterPrompting(PromptingRequestContext reqContext) : Line 0        at CrystalDecisions.Web.ReportAgent+ReportClosedExceptionHandlingReportSource.DoParameterPrompting(PromptingRequestContext reqContext) : Line 0        at CrystalDecisions.Web.ReportAgentBase.DoPrompting(PromptingHTMLRenderOption htmlOption) : Line 0        at CrystalDecisions.Web.Components.ParamComponent.ShowFullPrompt() : Line 0        at CrystalDecisions.Web.Components.ParamComponentBase.HandleException(Exception e) : Line 0        at CrystalDecisions.Web.CrystalReportViewer.HandleExceptionAndPromptIfNeeded(Exception x, EnumAspNetLifeCycleStage stage) : Line 0        at CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e) : Line 0        at System.Web.UI.Control.PreRenderRecursiveInternal() : Line 0        at System.Web.UI.Control.PreRenderRecursiveInternal() : Line 0        at System.Web.UI.Control.PreRenderRecursiveInternal() : Line 0        at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) : Line 0

最佳答案

Asp.net ReportViewer 有 ReportError 事件,您可以处理和自定义错误 OnReportError="ReportViewer1_OnReportError"

检查 CrystalReportViewer 是否有类似的东西:

CrystalReportViewer.onHandleException or
CrystalReportViewer.OnHandleExceptionAndPromptIfNeeded

HandleException() Fired when an exception occurs.

引用:http://www.crystalreportsbook.com/Crystal_Reports_Net_Ch14_3.asp很难找到新的文档。

关于c# - 报告应用程序服务器失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46854207/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com