间歇性 Crystal Reports 错误“无法提交请求以进行后台处理." [英] Intermittent Crystal Reports error "The request could not be submitted for background processing."

查看:9
本文介绍了间歇性 Crystal Reports 错误“无法提交请求以进行后台处理."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在带有 .NET framework 3.5 SP1 的 Windows Server 2008 上运行 Crystal Reports.

We are running Crystal Reports on a Windows Server 2008 with .NET framework 3.5 SP1.

我看到了导致一般错误无法提交请求以进行后台处理"的多种原因.在其他论坛上,但是由于特定报告的特定格式问题,它们往往是持久且可重复的,仅影响单个报告.
我们在以下堆栈跟踪中间歇性地看到此错误.

I have seen many causes of the general error "The request could not be submitted for background processing." on other forums, however they tend to be persistent and repeatable affecting just a single report due to a specific formatting issue with a specific report.
We are seeing this error with the below stack trace, intermittently.

  • 它会影响我们拥有的多个不同的报告.
  • 它比其他报告更频繁地影响一个特定报告.
  • 一旦某个报告受到影响,相同的错误通常会几乎同时出现在多个报告中,例如.接下来的 10 分钟.
  • 使用相同参数运行的相同报表可能在再次运行时(不久之后)仍然有效,或者应用程序可能需要重新启动才能成功重新运行报表.

这些报告以前都可以正常工作,没有问题.服务器或代码中似乎没有明显的变化会引发此错误.这背后的所有代码都是VB.NET

These reports all worked previously without issue. No change in server or code seems apparent which would have precipitated this error. All code behind for this is VB.NET

我们很难在测试环境中复制它,升级到最新版本的 Crystal 也没有任何帮助.如果您能为解决此问题提供任何帮助或建议,我们将不胜感激.

We have had difficulty reproducing it in test environments and upgrading to the latest version of Crystal has not helped at all. Any help or suggestions that you might be able to make to resolve this issue would be appreciated.

"The request could not be submitted for background processing."  
  at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.ReplaceConnection(Object oldConnection, Object newConnection, Object parameterFields, Object crDBOptionUseDefault)  
  at CrystalDecisions.CrystalReports.Engine.Table.SetDataSource(Object val, Type type)  
  at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)  
--- End of inner exception stack trace ---  
  at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)  
  at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)  
  at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataSet dataSet)  
  at "USER CODE"

推荐答案

隔离报表生成代码.

我们的最终解决方案是采用生成报告的代码并将其移至自己的独立服务中.然后我们的原始服务使用相关参数和 Crystal RPT 文件调用我们的新 Crystal 服务.这显然是一个代价高昂的解决方案,因为它涉及修改所有报表生成代码以改为调用 Crystal 服务.Crystal 服务不会出现该错误.除此之外代码没有改变,所以我们只能推测错误的原因是水晶报表引擎和我们应用程序中的环境的一些交互.

Our final resolution was to take the code that was generating the report and move it into its own isolated service. Our original service then calls our new Crystal service with the relevant parameters and Crystal RPT file. This is obviously a costly solution as it involves modifying all report generation code to call the Crystal service instead. The Crystal service does not exhibit the error. The code had not changed besides that, so we can only presume the cause of the error was some interaction of the Crystal reports engine and the environment within our application.

这篇关于间歇性 Crystal Reports 错误“无法提交请求以进行后台处理."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆