?
Solved

Crystal Report Load Report Failed

Posted on 2010-03-29
9
Medium Priority
?
509 Views
Last Modified: 2012-05-09
i put our code on our windows server 2003  , IIS6
the crystal report works couple of times and the we have the error load report failed

olease see attached image


here is the code

 private void LoadLibrary()
    {
        try
        {
             
            CrystalDecisions.Shared.ConnectionInfo connectionInfo = new CrystalDecisions.Shared.ConnectionInfo();
            connectionInfo.DatabaseName = "x";
            connectionInfo.ServerName = "y";
            connectionInfo.UserID = "z";
            connectionInfo.Password = "a";


            CrystalDecisions.CrystalReports.Engine.ReportDocument crdProgressTarget = new CrystalDecisions.CrystalReports.Engine.ReportDocument();



            string FileName;
            FileName = Server.MapPath("Reports/rAsset.rpt");//""




            Random MyRandomNumber = new Random();
            tmpReportName = FileName.Replace(".rpt", "").Replace(".ltr", "") + MyRandomNumber.Next().ToString() + ".rpt";
            System.IO.File.Copy(FileName, tmpReportName, true);

            crdProgressTarget.Load(tmpReportName);

           
            CrystalDecisions.Shared.TableLogOnInfo crtablelogoninfo;
               foreach (CrystalDecisions.CrystalReports.Engine.Table crtable in crdProgressTarget.Database.Tables)
            {
                crtablelogoninfo = crtable.LogOnInfo;
                crtablelogoninfo.ConnectionInfo = connectionInfo;
                crtable.ApplyLogOnInfo(crtablelogoninfo);
            }
                       
            CrystalDecisions.Shared.ParameterValues crpPCId = new CrystalDecisions.Shared.ParameterValues();

            crpPCId.AddValue(PCId);



            crdProgressTarget.DataDefinition.ParameterFields["PCId"].ApplyCurrentValues(crpPCId);

            crv.ReportSource = crdProgressTarget;


            crv.DataBind();

        }
        catch (Exception Ex)
        {
            lblError.Text = Ex.Message + Ex.InnerException + Ex.Source;
        }

       

    }
LF.JPG
0
Comment
Question by:kamal_2002
  • 5
  • 3
9 Comments
 
LVL 2

Expert Comment

by:coronoahcoro
ID: 28983875
I think you need to call the Close and Dispose method from the report object when you unload the report in order to fix this problem.
0
 

Author Comment

by:kamal_2002
ID: 28998919
im already doing that at page unload also their is a registry value for job work limits i increase it to maximium but problem still their
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 29007965
Are you trying to run multiple reports in a single run or is this multiple runs of the application?

mlmcc
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 

Author Comment

by:kamal_2002
ID: 29016217
we have only one report but there is more than 200 user access the rreport at the same time
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 29016593
Crystal does have a limit on concurrent open connections.  I believe the default is 5.  So only 5 users can access reports at the same time.

mlmcc
0
 

Author Comment

by:kamal_2002
ID: 29018242
i think the time between the users maybe is 1 minute so lets say in 10 minute
nore than 80 time the report is access
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 total points
ID: 29106317
As I stated there is a limit of 5 concurrent accesses.

mlmcc
0
 

Author Closing Comment

by:kamal_2002
ID: 31708281
this is didnt help me too much and im now just recyckung the application pool every time it stuck
0
 

Author Comment

by:kamal_2002
ID: 31733437
is the problem for 5 concurrent accesses. related to license issues??
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…
Get the source code for a fully functional Access application shell with several popular security features that Access VBA application developers desire, but find difficult or impossible to figure out how to code. You get the source code for managi…
Suggested Courses

599 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question