CrystalReports.Engine: Load report failed

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2006
Posts: 24
Reputation: sravankolla is an unknown quantity at this point 
Solved Threads: 0
sravankolla sravankolla is offline Offline
Newbie Poster

CrystalReports.Engine: Load report failed

 
0
  #1
Jul 21st, 2006
Hi All
I got an error while working with Crystal reports
I have added a crystal report and set a command over there to get data.
I have added a crystalreportviewer named CRV to my web form and the code given as


  1.  
  2. using System;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.Web;
  8. using System.Web.SessionState;
  9. using System.Web.UI;
  10. using System.Web.UI.WebControls;
  11. using System.Web.UI.HtmlControls;
  12.  
  13. namespace Cryppp
  14. {
  15. /// <summary>
  16. /// Summary description for WebForm1.
  17. /// </summary>
  18. public class WebForm1 : System.Web.UI.Page
  19. {
  20. protected CrystalDecisions.Web.CrystalReportViewer CrystalReportViewer1;
  21. protected CrystalDecisions.Web.CrystalReportViewer CRV;
  22. Sample sr=new Sample();
  23. private void Page_Load(object sender, System.EventArgs e)
  24. {
  25. // Put user code to initialize the page here
  26. sr.SetDatabaseLogon("sa", "", "as34", "pubs");
  27. sr.Load();
  28. CRV.ReportSource=sr;
  29. DataBind();
  30. }
  31.  
  32. #region Web Form Designer generated code
  33. override protected void OnInit(EventArgs e)
  34. {
  35. //
  36. // CODEGEN: This call is required by the ASP.NET Web Form Designer.
  37. //
  38. InitializeComponent();
  39. base.OnInit(e);
  40. }
  41.  
  42. /// <summary>
  43. /// Required method for Designer support - do not modify
  44. /// the contents of this method with the code editor.
  45. /// </summary>
  46. private void InitializeComponent()
  47. {
  48. this.Load += new System.EventHandler(this.Page_Load);
  49.  
  50. }
  51. #endregion
  52. }
  53. }

the error was

  1.  
  2. Server Error in '/Cryppp' Application.
  3. --------------------------------------------------------------------------------
  4.  
  5. Load report failed.
  6. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
  7.  
  8. Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Load report failed.
  9.  
  10. Source Error:
  11.  
  12.  
  13. Line 23: {
  14. Line 24: // Put user code to initialize the page here
  15. Line 25: sr.SetDatabaseLogon("sa", "", "as34", "pubs");
  16. Line 26: sr.Load();
  17. Line 27: CRV.ReportSource=sr;
  18.  
  19.  
  20. Source File: c:\inetpub\wwwroot\cryppp\webform1.aspx.cs Line: 25
  21.  
  22. Stack Trace:
  23.  
  24.  
  25. [LoadSaveReportException: Load report failed.]
  26. .F(String  , EngineExceptionErrorID 
  27. )
  28. .B(String , Int32 )
  29. CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob)
  30. CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob)
  31. CrystalDecisions.CrystalReports.Engine.ReportDocument.'()
  32. CrystalDecisions.CrystalReports.Engine.ReportDocument.get_Database()
  33. CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDatabaseLogon(String user, String password, String server, String database)
  34. Cryppp.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\cryppp\webform1.aspx.cs:25
  35. System.Web.UI.Control.OnLoad(EventArgs e)
  36. System.Web.UI.Control.LoadRecursive()
  37. System.Web.UI.Page.ProcessRequestMain()
  38.  
  39.  
  40.  
  41.  
  42. --------------------------------------------------------------------------------
  43. Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
  44.  
Help me
Thanks in advance...

Sravan...
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC