Last post Jul 04, 2011 10:14 PM by Damon Liu - MSFT
Jul 01, 2011 05:07 AM|meehirjha|LINK
I am currently using VS 2008 web application with Crystal Report 9.1 dlls as a reference. I write below lines in Page_Load to load "report1.rpt" which is designed in Crystal Report 9.1.
ReportDocument rpt = new ReportDocument();
When I run the application it works for the first time without any error, but when I re-run or refresh the page from second time onwards, It gives me an error "Load Report Failed". As soon as I close Visual Studio / stopped ASP.Net Development Server /
do IISReset if run in release mode, it again works fine for 1 time.
We have found that when it runs for the first time, it creates a copy of rpt file in Temp folder. When we delete that file it again works fine for 1 time. Can we have any method to override this copy to other folder which we defined in config file. If
we do that we can delete that file when it runs for the first time.
Can someone help me in resolving the above problem.
Kindly note that I cannot install crystal report 10.5 or I cannot redesign the rpt file in 8.5 which I think will work fine. I have to use above environment.
Thanks in advance, Meehir Jha
Jul 01, 2011 05:59 AM|Steelymar|LINK
Jul 01, 2011 07:41 AM|meehirjha|LINK
Thanks for reply. I tried it but unfortunately it is still not working. It behaves similar as earlier.
Jul 01, 2011 08:01 AM|Steelymar|LINK
did you close the ReportDocument after using it?
Jul 01, 2011 08:53 AM|meehirjha|LINK
Yes we have close the ReportDocument and still it giving the same error. Below is the code for the same:
sender, EventArgs e)
obj1 = new
reportName = Server.MapPath("report1.rpt");
Jul 04, 2011 10:14 PM|Damon Liu - MSFT|LINK
Please check that if you bind your data source after you refresh the page .