on 06-11-2012 2:10 PM
Hello,
We have a web application running on a windows 2003 server utilizing a cust crystal report. We continually get an error trying to display the crystal report in our web form. It happens a few times a day and our method of fixing it has been to do one of two things.
1. reset iis but we don't like to do this
2. simply copy in a dll into the bin folder which resets the application.
We know we need to do one of the above when we get the following error:
Could not load report file "Report Name Here".Load report failed
We came across this post and change the registry entry but it did not seem to have any affect on our issue:
Anyone else run into this and have a fix by chance?
Thanks.
What version of CR (exact please)?
What version of .NET?
Are you using .Close and .Dispose on the report object as you get done with it?
What database?
What database connection method?
Check the event viewer - are there any messages related to the app?
- Ludek
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the response. Here is some further information.
CR Version: 10.5.3700.0
Built on Visual Studio 2008 3.0 framework
.close and .dispose. How we are doing this currently is we are popping up the report in a popup window to display. How do you suggest running these in this scenario? Can we run them as soon as we are done loading them into the control?
Database 2008r2
Nothing in the event viewer concerning this.
There is any number of ways of doing this. For example:
Dim report as New ReportDocument
Protected Sub Page_load()
.
.
.
End Sub
Private Page_Unload()
report.close()
report.dispose()
GC.Collect
End Sub
Or:
//C# (on form open):
private void WebForm1_Init(object sender, System.EventArgs e)
{
if (boReportDocument != null)
{
boReportDocument.Close();
boReportDocument.Dispose();
GC.Collect();
}
}
Or:
// C# on form close
private void Page_Unload(object sender, EventArgs e)
{
if (boReportDocument != null)
{ boReportDocument.Close();
boReportDocument.Dispose();
GC.Collect();
}
}
- Ludek
Java script. It would call another page and this page would do your clean up. But this is a general coding question, perhaps for MS on how best to implement this. E.g.; forget about CR viewer being on the form. It could be any MS object. How would MS recommend cleaning up after that object?
Google search on "java script to close web form" comes up with:
http://www.javascripter.net/faq/closinga.htm
http://www.dreamincode.net/forums/topic/73742-who-to-close-web-form-using-aspnet/
http://www.javascriptkit.com/script/script2/closewin.shtml
And more.
- Ludek
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.