locked
Crystal Report Load Report Failed

    Question

  • Hi buddies,

     

    Our application is running in production which developed in Asp.net 1.1.4.2 and reports are in crystal Report 11. the back end  is sql server 2005. but we are constanly facing the problem that 'Load Report Failed'. Once we restart the IIS, the problem is rectified. we are unable to identify whether this problem due to application bug or missing configuration in any IIS setting. Could any one help us to reslove this problem?

    Tuesday, June 05, 2007 10:03 AM

All replies

  • Did you find a solution for this yet?  I have a very similar issue with Crystal 11 and C#
    Friday, June 22, 2007 7:44 PM
  • Need solution desp. Facing similiar problem.

     

    Only IISRestart resolves it until we hit the Load Report Failed error again. Please help.

    Thursday, June 28, 2007 9:08 PM
  • We had to do a few things and have finally resolved the issue.

     

    First, create a Page_Unload event and Dispose of the Crystal Viewer and set to null.  I found this on the web and tried it first, but it didn’t help.  I then changed my Report Document to be a public variable and then closed, disposed and set to null in the Page_Unload event.  This alone didn’t fix the issue.

    Here is a snippet of my code:

    public static ReportDocument CrystalRpt;
        protected void Page_UnLoad(object sender, EventArgs e)
        {
            this.CrystalReportViewer1.Dispose();
            this.CrystalReportViewer1 = null;
            CrystalRpt.Close();
            CrystalRpt.Dispose();
            GC.Collect();
        }
        protected void Page_Load(object sender, EventArgs e)
        {

          CrystalRpt = new ReportDocument();
            ConnectionInfo CrystalConn = new ConnectionInfo();

          .....

     

     

    I then created a tech support case with Business Objects and in the end they had me change the PrintJobLimit registry key from ‘75’  to ‘-1’

     

    ‘HKEY_LOCAL_MACHINE\SOFTWARE\BUSINESS OBJECTS\SUITE 11.5\REPORT APPLICATION SERVER\SERVER\PrintJobLimit’

     

    Then I restarted IIS and haven’t had the issue with Crystal since.  I was worried about there being adverse affects to the system by changing this, but haven’t had any and we print a ton of reports from the web server. 

     

    Hope this helps.  Let me know if you need anything else.

     

    • Proposed as answer by saunat sharma Tuesday, April 06, 2010 8:58 AM
    Friday, June 29, 2007 12:06 PM
  • Hi,

     

    can you please let me know how you are invocking reports that are developed in version 11.0 in ASP.Net.

    Are they standalone ie like the user interface generated by crystal tool.I am having a issue here in my project, I am new to CR and my project manager had assigned me a new task. There are reports that has been develped in version 11 and the user interface is crystal build when we select the input paremeters, I need to develop the same front end and pass the parameters with but use the same report.

    Can I achive this, if so How?

     

    Thanks

    SHyam

    Friday, June 29, 2007 7:33 PM
  • This seems a resource avilability issue. i.e. you are not properly releasing all the resources which you have captured while loading reports.

    I have deployed several applications on web using CR 11 but did not find such problem.

     

    Thursday, August 09, 2007 9:28 AM
  • sorry, didn't see this post.  Yes, all of our reports were developed in v11.  But my success was short lived.  I am still looking for a solution.

     

    Thursday, August 09, 2007 11:55 AM
  • Guys, I have been working on this issue for the past one week. I searched google and really collected 100's of reasons from different forums/tech articles and believe me, i tried all the options but still getting the same error. It really sucks. And I believe Even business objects can not pinpoint why this happens. And I really feel for all issues( whatever they can not handle ) in crystal we have only one generic error  " LOAD REPORT FAILED"... .

     

    Our energies are down and we are really thinking scrap crystal and build our own web reports.

     

     

    Tuesday, August 14, 2007 4:44 AM
  • have you tried with solution given by MonteJEllis

    have you tried doing same in different machine

    Can you empty your c:\Documents and Settings\currentuser\local settings\temp folder ?

    have you passed logon info at runtime?

     

    Hope this helps

    Tuesday, August 14, 2007 5:23 AM

  • You probably tried these suggestions already but here is what I would check for the error "Load Report Failed".

    1. If your loading the report from a file be positive the filepath is correct.
    2. ASPNET account needs access to the TEMP directory on the server.
    3. Make sure to set the reportviewer's reportsource in page_init.


    Also, you can handle the reportviewers error event and see if a different exception is available there.
    Tuesday, August 14, 2007 2:27 PM
  • Do I feel your pain.  I totally agree with you.  If we weren't so embedded with Crystal in other parts of our business, I would scrap it today.  The web stuff is VERY buggy.  Let me know if you find something that works.... Because I have tried "everything"

     

    I think the people that say it works only load a few reports a day.  We have on average about 300 reports loaded off our web server every day.  We have found that if we restart the server every evening and restart IIS at noon and 5pm, we have eliminated the issue.  But what a cheesy way to work around it.

     

    Tuesday, August 14, 2007 8:17 PM
  • I've been searching for a long time, but so far haven't been able to find any solution either Sad


    My project is a vb.net 2005 application where the .rpt files are inside the application, not as standalone files. The problem happens on two computers 80% of the times the SetDataSource method is called and has happened a few times on a few other computers
    I don't believe it can be a permission problem since the problem doesn't happen all the time
    Wednesday, August 15, 2007 7:03 AM
  • I tottlaly agree it isn't a permissions issue.  I believe Crystal isn't releasing all of it's resources after the report is loaded even though I am doing everything you are supposed to do.  I think it is either a bug in Crystal or I am still missing a resource to be freed up.  The main problem is Business Objects has no idea what to do either.  When I called them, they just grabbed at straws.  I am going to try something I read yesterday, I will let you know if it helps. 

     

    Wednesday, August 15, 2007 12:17 PM

  • Do you think it's just too much of a load on the server when they fail to load?

    Or...once one report fails, all requests after that fail?



    Wednesday, August 15, 2007 2:59 PM
  • I think Crystal slowly eats up the server resources and then when a report fails, they all fail after that until IIS is restarted or sometimes in our case, we have to restart the server.

     

    Wednesday, August 15, 2007 3:32 PM

  • Could it be that the crystal reports are taking up way too much disk space in the Temp directory? 


    BTW... which version of crystal, asp, IIS are you using?



    Thursday, August 16, 2007 7:50 PM
  • I'm having the same problem as well. We've been able to track it down to when a user tries to run a report from the application and the report window open up and since the results are not returned immediately, they go back to the parameter screen and try to either run it again or they try to run another report. It's at that time that Crystal blows up and returns the Load Report Error and the only way to bring it back to life is to do an iisreset.

     

    If anyone has a solution let me know...

    Friday, August 31, 2007 5:11 PM
  •  MonteJEllis wrote:
    I think Crystal slowly eats up the server resources and then when a report fails, they all fail after that until IIS is restarted or sometimes in our case, we have to restart the server.

     

     

    Hi MonteJEllis.

     

    Im wonder if u have news about this. I have the same trouble using Crystal 9. Let me know if u have new tips.

    Wednesday, September 19, 2007 1:38 PM
  • I experienced the same problem during development. All I did was to clean up the temporary ASP.NET folder for the project. But, yes, this is not the expected solution, especially in a production environment.

    Noli
    Wednesday, September 19, 2007 3:44 PM
  • If you haven't found a solution for this yet, here is one I will guarantee to work.  I tried to duplicate in VB for another viewer I have an it was a pain there.  But this C# expample works perfectly.Our server processed 696 report  requests yesterday and had zero errors.  Here a snippit of the code below.  It highlights the stuff that wasn't readily apparent from anything else I could read on the web.

    private ReportDocument CrystalRpt;
        //Declaring these here and disposing in the Page_Unload event was the key.  Then the only other issue was the
        // limitations of Crystal 11 and simultaneous access to the rpt file.  I make a temp copy of the file and use that in the
        // method.  Then I delete the temp file in the unload event.

        private ReportDocument mySubRepDoc;
        private ReportClass ReportObject;
        private string tmpReportName;

        protected void Page_UnLoad(object sender, EventArgs e)
        {
    Try
    {
                CrystalReportViewer1.Dispose();
                CrystalReportViewer1 = null;
                CrystalRpt.Close();
                CrystalRpt.Dispose();
                CrystalRpt = null;
                mySubRepDoc.Close();
                mySubRepDoc.Dispose();
                mySubRepDoc = null;
                ReportObject.Close();
                ReportObject.Dispose();
                ReportObject = null;
                GC.Collect();
                File.Delete(tmpReportName);

    }
    catch
    { ...Error Handler }
        }
     


    protected void Page_Load(object sender, EventArgs e)
        {
            CrystalRpt = new ReportDocument();
            ConnectionInfo CrystalConn = new ConnectionInfo();
            TableLogOnInfo tblLogonInfo = new TableLogOnInfo();
            ReportObject = new ReportClass();
            
            TableLogOnInfo CrystalLogonInfo = new TableLogOnInfo();
            ParameterField CrystalParameter = new ParameterField();
            ParameterFields CrystalParameters = new ParameterFields();
            ParameterDiscreteValue CrystalParameterDV = new ParameterDiscreteValue();

            TableLogOnInfo ConInfo = new TableLogOnInfo();
            SubreportObject mySubReportObject;
            mySubRepDoc = new ReportDocument();

            //Report name is sent in querystring.
            string ReportName = Request.QueryString["ReportName"];

            // I did this because Crystal 11 only supports 3 simultaneous users accessing the report and 
            // we have up to 60 at any time.  This copies the actual rpt file to a temp rpt file.  The temp rpt
            // file is used and then is deleted in the Page_Unload event

            Random MyRandomNumber = new Random();
            tmpReportName = ReportName.Replace(".rpt", "").Replace(".ltr", "") + MyRandomNumber.Next().ToString() +".rpt";
            File.Copy(ReportName, tmpReportName, true);
     
            CrystalRpt.Load(tmpReportName);
    Friday, September 21, 2007 3:04 PM

  • Doesn't this method use a temp copy?
    Report.Load(reportName, OpenReportMethod.OpenReportByTempCopy)

    http://msdn2.microsoft.com/en-us/library/ms225981(VS.80).aspx

    Or does this only use up to 3 temp copies?


    Also...How come I've always had to set the report source in page_init? If I don't the Crystal prompting does not work.

    Monday, September 24, 2007 2:49 PM
  • I had not seen that before.  I will try it out and see if there are any adverse affects.  Luckily we get about 300 to 400 reports printed in a given day, so it should show up quickly if there are an issues.  Thanks for the heads up.

     

    Monday, September 24, 2007 3:55 PM
  • friends, we are also facing the same problem. trying everything what we find in net. nothing works. we are not getting the 'load repport error' in the test server but in production server. Please some one help us.

    Wednesday, September 26, 2007 7:34 AM
  • If you are doing it in C# look at my post from last week.  We had the same issue and the code posted there fixed it.  Also read from a month ago (same thread).  There is a registry entry change to make on the production server.  Let me know if you need more help.  I was in the same place as you and Business Objects was NO help

     

    Wednesday, September 26, 2007 12:07 PM
  • I am having this same sort of issue when I am paging through a report, but I am using ASP.NET with VB.  I'm going to try to code this in VB in the way that yall are talking about.  This is a huge problem for us as well.

     

    Thanks.

     

    Thursday, March 06, 2008 9:54 PM
  • I am also facing the same issue in Production Server. The rpt files are not getting cleared in temp folder and it throws "Load report Failed". Please let me know if you find a solution
    Monday, November 24, 2008 4:07 PM
  •  MonteJEllis,

    I am facing issue similar issues that you faced more than a year back (your post dtd Sept 21, 2007). I understand that you made use of temp copy of report file to overcome the issue.

    Can you please help me understand how it helped in the situation? I am little confused since it looks like report will still be loaded as before but using a different file name, so how does this fool around crystal report in terms of by passing concurrent/simultaneous access.

    I appreciate your help - Prashant

     






    ---------------------------------------

    If you haven't found a solution for this yet, here is one I will guarantee to work.  I tried to duplicate in VB for another viewer I have an it was a pain there.  But this C# expample works perfectly.Our server processed 696 report  requests yesterday and had zero errors.  Here a snippit of the code below.  It highlights the stuff that wasn't readily apparent from anything else I could read on the web.

    private ReportDocument CrystalRpt;
        //Declaring these here and disposing in the Page_Unload event was the key.  Then the only other issue was the
        // limitations of Crystal 11 and simultaneous access to the rpt file.  I make a temp copy of the file and use that in the
        // method.  Then I delete the temp file in the unload event.

        private ReportDocument mySubRepDoc;
        private ReportClass ReportObject;
        private string tmpReportName;

        protected void Page_UnLoad(object sender, EventArgs e)
        {
    Try
    {
                CrystalReportViewer1.Dispose();
                CrystalReportViewer1 = null;
                CrystalRpt.Close();
                CrystalRpt.Dispose();
                CrystalRpt = null;
                mySubRepDoc.Close();
                mySubRepDoc.Dispose();
                mySubRepDoc = null;
                ReportObject.Close();
                ReportObject.Dispose();
                ReportObject = null;
                GC.Collect();
                File.Delete(tmpReportName);

    }
    catch
    { ...Error Handler }
        }
     


    protected void Page_Load(object sender, EventArgs e)
        {
            CrystalRpt = new ReportDocument();
            ConnectionInfo CrystalConn = new ConnectionInfo();
            TableLogOnInfo tblLogonInfo = new TableLogOnInfo();
            ReportObject = new ReportClass();
            
            TableLogOnInfo CrystalLogonInfo = new TableLogOnInfo();
            ParameterField CrystalParameter = new ParameterField();
            ParameterFields CrystalParameters = new ParameterFields();
            ParameterDiscreteValue CrystalParameterDV = new ParameterDiscreteValue();

            TableLogOnInfo ConInfo = new TableLogOnInfo();
            SubreportObject mySubReportObject;
            mySubRepDoc = new ReportDocument();

            //Report name is sent in querystring.
            string ReportName = Request.QueryString["ReportName"];

            // I did this because Crystal 11 only supports 3 simultaneous users accessing the report and 
            // we have up to 60 at any time.  This copies the actual rpt file to a temp rpt file.  The temp rpt
            // file is used and then is deleted in the Page_Unload event

            Random MyRandomNumber = new Random();
            tmpReportName = ReportName.Replace(".rpt", "").Replace(".ltr", "") + MyRandomNumber.Next().ToString() +".rpt";
            File.Copy(ReportName, tmpReportName, true);
     
            CrystalRpt.Load(tmpReportName);
    Wednesday, January 14, 2009 10:08 PM
  • Thanks a ton Mr. That solved my problem when Iam working with CR in VS C# as well. So, freeing up the resources isnt the problem here , but the registry key in
    HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\Server\PrintJobLimit must be changed to -1 for CR to be able to open up multiple instances of reports at a time for viewing/printing. Thank you again.

    Close() of report objects will never be called until the page gets unloaded. but, I needed to open many reports a time without any form (C#) being unloaded. So, changing the registry key does the trick. I dont know why its 75 and didnt work though. ?
    Thyagarajan
    • Proposed as answer by ferronrsmith Wednesday, August 05, 2009 2:13 AM
    Monday, June 15, 2009 9:12 PM
  • What i did was to in the  registry key edit
     
    HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\Server\PrintJobLimit  and change it to -1


    To clean up my temp file i wrote a batch script which is run every 30 minutes

    @echo off
    echo Job start on %date% at %time% under %UserName% >> c:\fgmis\scripts\Log.txt
    taskkill /F /IM w3wp.exe
    del /Q c:\windows\temp\*.*
    echo "%date% : Deleted windows\temp files" >> c:\fgmis\scripts\deltemp.log


    At first when i tried deleted i realised the file was been locked, so downloaded unlocker and found out that w3wp.exe was locking the file

    I added the taskkill command and /F to forcefully kill the task. It works perfectly for me
    Wednesday, August 05, 2009 2:17 AM
  • My problem was also solved when I changed the PrintJobLimit from 75 to -1 in;
     
    HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\Server\PrintJobLimit 


    Tuesday, August 11, 2009 6:05 PM
  • We have a web application running in production which developed in ASP.NET 2.0 and Crystal Reports for Visual Studio 2005. The backend Database server is SQL server 2005. The Crystal reports with asp.net is working fine most of the time but after some time it gives error "Load Report Failed". We are continuously facing this problem. Please give me a solution to overcome this. Thanks in advance.
    Wednesday, December 02, 2009 8:03 AM
  • http://crystalrepterrinfo.blogspot.com/2009/12/load-report-failed-windows-98-crystal.html
    Tuesday, December 15, 2009 6:39 AM
  • Hi,

    I am using ur code for my application ...... but  throw exception of

     

     

    Object reference not set to an instance of an object.

     

     tmpReportName = ReportName.Replace(".rpt", "").Replace(".ltr", "") + MyRandomNumber.Next().ToString() + ".rpt";



    first thing why are you using this line


    string ReportName = Request.QueryString["ReportName"];

    please send me ur reply if u r there
    Thanks




    Tuesday, March 30, 2010 9:46 AM
  • Hello 

     

    The solution to Load Report Failed

    is simply delete the temparory files from temp folder . And restart the system.

    That's all

    Cause :

    According to my case it happened when system was abnormal shutdown.

    Crystal report has temp report files in Temp folder which were not washed out 

    due to this it caused Load Report failed error.

    I am certain this would solve your issue too.


    faheem
    • Proposed as answer by FaheemKhan Saturday, October 09, 2010 6:13 AM
    Saturday, October 09, 2010 6:13 AM
  • Hi MonteJEllis ,

    I tried with your code and registry setting you have told too..But still I am getting error erro as "Load Report Failed" on productin server when about 300 pdfs are exported from Crystal report.This issue is really eating my head.Your urgent help is appreciated.

     

    Thanks

    Dhanashri.

     

     

    Friday, December 24, 2010 10:12 AM
  • Dear Montej,

    I am Jigar Darji, a Beginner in ASP.Net.

    I am facing the problem with error "Load Report failed", using SQL-2000 and VS2008 C# for ASP.Net web application.

    I followed your code and it seems positive for me but just help me how i can add the type or namespace " ReportDocument " in my code.

    Thanks.

    Tuesday, January 11, 2011 8:05 AM
  • Hi,

    I'm facing similiar problem on my  production server.

    I had 2 production server which specification are identical, both I install the same Crystal Report XI & the same web application, and they are both running on ASP.Net 1.1

    I've configured the same application pool for both server.

    For some time, 1 month both server running well, but yesterday, 1 of my server crashing and keep reporting 'Load Report Failed' without any symthoms, I've restart IIS, restart server, but still get that eror when printing report....

    Any solution for this ? I know this is not a code issue, because, 1 of my server running well printing reports...

     

    Monday, January 17, 2011 3:42 AM
  • Hi Hendra,

    Check out your c:\windows\temp directory and delete all the .tmp files on that folder, then restart your server. This should solve your problem.

    Regards,

    Orly

    Thursday, April 07, 2011 5:14 AM