On my web server i can clearly see temporary files of crystal reports being created when a report is called from ASP.NET page. It is recommended to set a special permission no C:\Windows\Temp folder as follows:
Add permission to List folder and Read
Add permission to Create files, Append files
Add permission to Delete files
This should fix the problem in 80% of the cases. Although there are other scenarios as well which cause this problem. But i have here indicated the one common problem, i hope it works for most of you and save you a day.
Another issue might be in the coding section, if report documents are not properly closed and disposed off, this will trigger the error as well. Whenever a report is called in a web application a copy in C:\Windows\Temp folder is created and than served to the client response.
You should inspect the C:\Windows\Temp folder to see if these temp files are not hanging around, if so that means the report documents are not properly close and disposed after processing. Crystal report document need to be closed by calling the Close() method and than the Dispose() method to clean.
There is a recommendation for this in SAP Crystal reports document, and the code should look similar to the following:
private void Page_Unload(object sender, EventArgs e)
{
if (boReportDocument != null)
{
boReportDocument.Close();
boReportDocument.Dispose();
GC.Collect();
}
}
Reference: Troubleshooting the “Load Report Failed” Error
No comments:
Post a Comment