水晶报表异常和常规报错处理之总汇

从网上搜索到这样的文章:

there   is   a   registry   key   setting-  
  HKEY_LOCAL_MACHINE;SOFTWARE;Crystal   Decisions;10.0;Report   Application  
  Server;InprocServer;PrintJobLimit(defaul  
  t   75)  
   
  You   can   increase   this   size.   There   are   two   registry   keys   both   under   the  
  Report   Application   Server.   The   InprocServer   sets   the   limit   for   the   number  
  of   "open"   reports   even   if   you're   not   explicitly   using   the   RAS   (i.e.   just  
  using   the   .NET   Report   Document   component   or   CrystalViewer   control-   the  
  crystal   engine   *is*   using   the   RAS   behind   the   scenes).   If   you're   using   the  
  RAS   explicitly,   then   you   can   set   the   same   key   under   CrystalDecisions;Report  
  Application   Server;Server;PrintJobLimit  
   
  Also,   I   was   not   "disposing"   of   my   report   objects   after   rendering   them   on   the  
  web   form.   In   the   Page_Unload   event,   I   implemented   the  
  ReportDocument1.Dispose()   method   (not   suggested/mentioned   in   any   of   the  
  sample   code   I   have   found   or   any   of   the   books   on   crystal.NET   I   have   read)  
   
  I   have   not   had   the   problem   since   making   these   changes.   I   was   cautioned  
  against   raising   the   PrintJobLimit   too   high,   however,   as   this   can   eventually  
  lead   to   serious   performance   issues,   so   be   careful  。

经过反复分析才知道有几种办法:

A.具体为修改下面两个键的值。  
  HKEY_LOCAL_MACHINE;SOFTWARE;Crystal   Decisions;10.0;Report   Application  
  Server;InprocServer;PrintJobLimit  
   
  修改为1000  
  还有一个HKEY_LOCAL_MACHINE;SOFTWARE;Crystal   Decisions;10.0;Report   Application  
  Server;Server;PrintJobLimit   也修改为1000

B.装企业版的水晶报表

本人通过A项方案解决水晶报表此异常,B项也是网上大家都议论着的!推荐使用!

二.用户使用水晶报表的时候出现加截报表错误:

刚开始用户使用非常正常,但使用一天(该用户使用报表频率非常大)就会出现"报表加载失败",然后用户重启服务器这后又可以了,具体信息出错请看下截屏
   我发现在C:/WINDOWS/Temp这个临时文件里面有大量的水晶报表文件,每使用一次就会生成几个文件,在电脑没有重新启动的情况下它不会被删除,而出现大量的无用文件,在google里面搜了一圈发现也有人碰到这样的情况但回答的很模糊只是说要将水晶报表装载的文档关闭掉,从这里可以看出出现这样的错误应该是程序员人为照成的.
    具体解决如下:
          1.ReportDocumen实例必须为类成员    

private  ReportDocument prtp  =   new  ReportDocument();   



          2.使用完水晶报表必须关闭文件,这样子就不会在windows的临时文件里面产生.

     private   void  Page_Unload( object  sender, EventArgs e)
    
{
        prtp.Dispose();
    }

             Page_Unload 事件是在页面完全显示的时候运行,这样子就解决了.


以上总汇内容参考:http://www.cnblogs.com/daxia/archive/2007/04/11/TonnerTang.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值