Crystal Reports: Load report failed error.

Discussion in 'ASP .Net' started by Simon, Jun 7, 2005.

  1. Simon

    Simon Guest

    Hi

    I try to open a CR report file located on the network path from a web form
    developed with vs2003 and CR for Visual Studio, but the Load method of
    ReportDocument object always return error.

    ---------------------
    Load report failed.
    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.

    Exception Details:
    CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Load report
    failed.

    Source Error:

    Line 32: oRpt.Load( "\\\\server\\dir\\report.rpt");

    Source File: c:\inetpub\wwwroot\crtest\webform1.aspx.cs Line: 32

    Stack Trace:

    [LoadSaveReportException: Load report failed.]
    .I(String , EngineExceptionErrorID )
    .E(String , Int32 )
    CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String
    reportName, OpenReportMethod openMethod, Int16 parentJob)
    CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String
    reportName)
    crtest.WebForm1.Page_Load(Object sender, EventArgs evt) in
    c:\inetpub\wwwroot\crtest\webform1.aspx.cs:32
    System.Web.UI.Control.OnLoad(EventArgs e)
    System.Web.UI.Control.LoadRecursive()
    System.Web.UI.Page.ProcessRequestMain()


    ----------


    I have tryed to use impersonating setting the web.config file but I still
    have a problem.
    If I copy locally the CR report file and try to open it the web application
    work fine, I try also to open file using FileStream and work.

    sample code:

    // this work
    FileStream fs = new FileStream( "\\\\server\\dir\\report.rpt",
    FileMode.Open, FileAccess.Read );
    fs.Close();

    ReportDocument oRpt = new ReportDocument();

    // this generate error
    oRpt.Load( "\\\\server\\dir\\report.rpt");

    // this work
    oRpt.Load( "c:\\Temp\\report.rpt");

    CrystalReportViewer1.ReportSource = oRpt;

    Some suggestion ?

    Thanks in advance

    Simon.
     
    Simon, Jun 7, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. viki
    Replies:
    0
    Views:
    2,327
  2. Peri
    Replies:
    1
    Views:
    3,039
    =?Utf-8?B?Um90aGFyaWdlcg==?=
    Jul 21, 2005
  3. Learner
    Replies:
    1
    Views:
    1,157
    Richard Dudley
    Jan 11, 2006
  4. Anna S
    Replies:
    1
    Views:
    716
    Murtaza Iqbal Gandhi
    Apr 19, 2009
  5. Comfort
    Replies:
    0
    Views:
    571
    Comfort
    Oct 18, 2004
Loading...

Share This Page