Visual Studio Development Bookmark and Share   
 index > Crystal Reports for Visual Studio > crystal report error
 

crystal report error

hi,

Crystal report is giving "Load Report failed" error when it is loading. The reports run perfectly when I debug those from VS 2008 but the error is generating from the developmental server.
I have checked the fully qualified URL of the RPT file name and that was correct.

here is some extra information regarding that

actually the .aspx file contains the report viewer, a couple of text box and dropdowns for the search criteria.

the code behind lays in a flat try-catch construct

in which the code goes like

 

ConnectionInfo mycon = new ConnectionInfo();

                mycon.UserID = "userID";

                mycon.Password = "password";

                mycon.DatabaseName = "dbname";

                mycon.ServerName = "servername";

               //creating report document

                ReportDocument rpt_doc = new ReportDocument();

                string path = Server.MapPath(@"MyReport.rpt");

		Response.Write("report is going to load");

                rpt_doc.Load(path);

		Response.Write("Report has now loaded");

//declaration and initialization of the parameters goes here



report_viewer.ParameterFieldInfo = myParams;

                report_viewer.ReportSource = rpt_doc;

                report_viewer.HasZoomFactorList = true;

                report_viewer.DataBind();

            



                //Bind

                TableLogOnInfos tbl_log = new TableLogOnInfos();

                tbl_log = report_viewer.LogOnInfo;

                



                foreach (TableLogOnInfo mytablelogon_info in tbl_log)

                {

                    mytablelogon_info.ConnectionInfo = mycon;

                }



                if (Session["report_viewer"] == null)

                {

                    Session["report_viewer"] = rpt_doc;

                }

 

ConnectionInfo mycon = new ConnectionInfo();
                mycon.UserID = "admin";
                mycon.Password = "Jester05";
                mycon.DatabaseName = "repairs";
                mycon.ServerName = "localhost";
                //mycon.ServerName = "69.41.166.44";
                //creating report document
                ReportDocument rpt_doc = new ReportDocument();
                string path = Server.MapPath(@"cr_most_replaced_spares.rpt");
                
                if(File.Exists(path))
                    lbl_path.Text = path;
                else
                    lbl_path.Text = path+" not exist.";
                rpt_doc.Load(path);



***********************************************************
the control falls in the catch block when executing the red marked line as the "Report has now loaded" - line is not printed but previous one is printed.

and the exception message is what I told you before("Load report failed").


Please let me know if any other information I missed or not.

Thanks
Supradip
Supradip  Wednesday, October 14, 2009 2:16 PM

Hi,

For questions relating to crystal report in asp.net, please post to :
http://forums.asp.net/76.aspx .  You will get better and quicker responses from the experts there.

Harry


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Harry Zhu  Thursday, October 15, 2009 9:34 AM

You can use google to search for other answers

Custom Search

More Threads

• Inherit From Base Report
• Crystal Report Table lines and image not visible when called through addin
• how to preview report with multiple records?
• how do i print the contents of each cell in a sqlce database?
• Database Login
• connection string/datasource problem
• Settings to access printer '\\hercules\prtmark01' are not valid
• Force the MSI to install CR 32-bit
• How to set Unbound filed with Crystal Report
• No Data in Report (Re-visited)