cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove Load Report Failed Error in Crystal Reports version 13.0?

Former Member
0 Kudos

I am developing a simple Windows form app using Crystal Report (Version 13.0) and .NET Framework 4.0 as well as VS 2013. What i am doing is that i have a Crystal report viewer on the form which is supposed to show/load my report when button is clicked. My code to load a report is:

ReportDocument rpt = new ReportDocument(); rpt.Load(@"e:\<path>\CrystalReport1.rpt"); crystalReportViewer1.ReportSource = rpt; crystalReportViewer1.Refresh();

Problem i am getting is that whenever i click button, an exception occurs saying this:

CrystalDecisions.Shared.CrystalReportsException was unhandled HResult=-2146232832 Message=Load report failed. Source=CrystalDecisions.CrystalReports.Engine StackTrace: at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) at CystalReportsApp.Form1.button1_Click(Object sender, EventArgs e) in e:\<path>\CystalReportsApp\Form1.cs:line 32 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at CystalReportsApp.Program.Main() in e:\<path>\CystalReportsApp\Program.cs:line 19 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.Runtime.InteropServices.COMException HResult=-2147467259 Message=The system cannot find the path specified. Source=Analysis Server ErrorCode=-2147467259 StackTrace: at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() InnerException: 

Solutions i have tried are:

  1. Checked the path again and again.
  2. Checking file permissions on the temp folder as well as on the folder where my report resides.

But all in vein. Can somebody please tell me as what's going behind the scene?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Please check the reference threads:

Crystal Reports: &amp;quot;Load report failed&amp;quot; error.

Thanks,

DJ

Former Member
0 Kudos

No both of your resources ain't working for me!

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you Sir for your great concern. But sorry to tell you that solution you posted is not working. Please tell me as what's going wrong with it?

former_member292966
Active Contributor
0 Kudos

Hi Shahid,

Hmmm.  To run a report, the engine does a few things: 

Opens the report.

Logs into the database

Set parameters if they exist.

Queries database and does first pass over the database.

Groups and summarizes and evaluates running totals. 

Performs second pass over database, processes formulas,

Runs the report.

These are the major steps that  go to running a report.  The Load error is very generic so it would be nice to try and break down your code to see where it may be failing.

We know the path is correct.  Is the report logging into the database?

Are you passing anything back to the report?  Setting parameters, formulas, sorting?

Thanks,

Brian

Former Member
0 Kudos

Thanks alot Sir. As being a newbie, i just watched a youtube demo of using it and started programming report. Can you give me a link to a demo project so that i could run it on my machine to check?

former_member183750
Active Contributor
0 Kudos

Sample apps are here:

Crystal Reports for .NET SDK Samples - Business Intelligence (BusinessObjects) - SCN Wiki

Dev help files:

SAP Crystal Reports .NET SDK Developer Guide

SAP Crystal Reports .NET API Guide

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

Thanks alot Sir. Well just for the sake of information, i wanted to know that does your latest crystal report run time version have compatibility with Visual Studio version 2013 because while installing that, i was confronting many access denied problems. What could be he reason?

former_member183750
Active Contributor
0 Kudos

SAP Crystal Reports, Developer Version for Visual Studio .NET, SP 12 supports VS 2013 fully. If you search this forum, you'll find out that there are a lot of people using this combination with success...

Perhaps, you want to collect your thoughts and ask what you actually want to ask, rather than giving us drips and drabs to hang our self on(?). E.g.;

Problem description

The exact version of CR and VS used

How do we reproduce the problem

OS

Database

Database connection type

- Ludek

Former Member
0 Kudos

VS version = 2013

CR version = 13.0.11.1467 (Is this version right?)

OS = Windows 7 Ultimate (32 bit) with SP1

Database = MS Access 2010

Databse connection type = OLEDB

.NET Framework version = 4.0

Please guide me as what version of CR should i be using for this type of configuration? As i have read that the version i am using is obsolete. I have deleted existing version of CR now. And want a fresh start. Please guide me. Thanks alot. And kindly tell me that corresponding CR runtime is included in the CR developers version of Microsoft .net package?

former_member292966
Active Contributor
0 Kudos

Hi Shahid,

In the Load you are prefixing your path with @ with <path>.  This makes the path a literal string and not a implied path.  Remove the @ and it should work.

Just to see what C# is doing, put that path with the @ into a string variable and add a watch to it.  Instead of an valid path, you'll still see your literal.

Hope this helps,

Brian