Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Load report failed.

Load report failed.

Scheduled Pinned Locked Moved C#
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NiloofarNoroozi
    wrote on last edited by
    #1

    i have problem in crystalreport. error:Load report failed.

    Vpost vpost = new Vpost();
    int nopersoneli;
    int.TryParse(vpost.txtNoPersoneli.Text.ToString(), out nopersoneli);
    ReportDocument reportDocument = new ReportDocument();
    ParameterField paramField = new ParameterField();
    ParameterFields paramFields = new ParameterFields();
    ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
    paramField.Name = "@nopersoneli";
    paramDiscreteValue.Value = nopersoneli;
    paramField.CurrentValues.Add(paramDiscreteValue);
    paramFields.Add(paramField);
    crystalReportViewer1.ParameterFieldInfo = paramFields;
    ** reportDocument.Load("PostCrystalReport1.rpt");** reportDocument.SetDatabaseLogon("", "", "niloofar\\i2", "vezaratekar", false);
    crystalReportViewer1.ReportSource = reportDocument;

    J 1 Reply Last reply
    0
    • N NiloofarNoroozi

      i have problem in crystalreport. error:Load report failed.

      Vpost vpost = new Vpost();
      int nopersoneli;
      int.TryParse(vpost.txtNoPersoneli.Text.ToString(), out nopersoneli);
      ReportDocument reportDocument = new ReportDocument();
      ParameterField paramField = new ParameterField();
      ParameterFields paramFields = new ParameterFields();
      ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
      paramField.Name = "@nopersoneli";
      paramDiscreteValue.Value = nopersoneli;
      paramField.CurrentValues.Add(paramDiscreteValue);
      paramFields.Add(paramField);
      crystalReportViewer1.ParameterFieldInfo = paramFields;
      ** reportDocument.Load("PostCrystalReport1.rpt");** reportDocument.SetDatabaseLogon("", "", "niloofar\\i2", "vezaratekar", false);
      crystalReportViewer1.ReportSource = reportDocument;

      J Offline
      J Offline
      John_Adams
      wrote on last edited by
      #2

      Hello, You might have tried these suggestions already but here is what I would check for the error "Load Report Failed". 1. If you are 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. Hope this helps :).

      Regards, John Adams ComponentOne LLC

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups