Summary of crystal report exceptions and common error handling

Source: Internet
Author: User

Search for such articles from the Internet:

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
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-
Crystal engine * is * using the RAS behind the scenes). If you're using
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
Web form. In the page_unload event, I implemented
Reportdocument1.dispose () method (not suggested/mentioned in any of
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.

After repeated analysis, we can find several methods:

A. Modify the values of the following two keys.
HKEY_LOCAL_MACHINE; software; Crystal decisions; 10.0; Report Application
Server; inprocserver; printjoblimit

Change to 1000
There is also an HKEY_LOCAL_MACHINE; software; Crystal decisions; 10.0; Report Application
Server; server; printjoblimit is also modified to 1000

B. Install the Crystal Report of the Enterprise Edition

I used item a solution to solve this problem in the Crystal Report. Item B is also discussed on the Internet! Recommended!

2. An error occurred while using the crystal report:

At the beginning, the user was very normal, but when using the report for one day (the user used the report frequently), "Report loading failed" would occur, and then the user restarted the server, for more information, see the screenshot.
I found that there are a large number of crystal report files in the temporary file C:/Windows/temp, and several files are generated every time you use them, if the computer is not restarted, it will not be deleted, but a large number of useless files will appear, I searched Google and found that some people encountered such a situation, but the answer was vague. I just said that I would close the file loaded with the crystal report, it can be seen from this that such errors should be made by programmers.
The solution is as follows:
1. The reportdocumen instance must be a class member.

Private reportdocument prtp = new reportdocument ();

2. After using the crystal report, you must close the file so that it will not be generated in the temporary file of windows.

Private void page_unload (Object sender, eventargs E)
{
Prtp. Dispose ();
}

The page_unload event is run when the page is fully displayed, which solves the problem.

The above contents reference: http://www.cnblogs.com/daxia/archive/2007/04/11/TonnerTang.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.