An error occurred while loading the crystal report.

Source: Internet
Author: User

Fault description:
Vs2005 Crystal Reports for Web ApplicationsProgramAfter multiple times of use, the loading of the report will fail. Restarting the Web server is normal again. After a while, the same problem may occur.

When you use a crystal report, a report loading error occurs.
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.

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.

PrivateReportDocument 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)
{< br> prtp. dispose ();
}< br>
the page_unload event is run when the page is fully displayed.

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.