CrystalReport Load report failed

前端 未结 7 1607
孤街浪徒
孤街浪徒 2020-12-16 17:28

I have a windows application project (C# and .NET 2.0) that used Crystal Report 2008. But I get error sometimes (it seems accidentally) in loading report. That error is:

7条回答
  •  死守一世寂寞
    2020-12-16 17:56

    If your application is a standalone executable then this error is generated because you are not closing your report object properly when you are done with whatever you do. You might see this error running in your application as an ASP.NET app with a lot of users accessing your site simultaneously.

    You can cause the error to appear sooner by tweaking this registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\CRYSTAL DECISIONS\10.0\REPORT APPLICATION SERVER\SERVER\PrintJobLimit
    

    It normally is defaulted to 75. For debugging you can set it to a smaller value and cause the error to appear sooner.

    When you are done using a report object, call the .Close() method which will clean up the un-managed resources used.

    There are those that mention to change the setting to -1. This is a mistake, it will only cause other problems for an application that is long running. The process will eventually run out of resources and start to fail in ways that will be even more difficult to troubleshoot.

提交回复
热议问题