We help IT Professionals succeed at work.
Get Started

Crystal Reports load error in dev but not test environment

Andrew Crofts
on
264 Views
Last Modified: 2012-05-08
I have an ASP.net app which runs and displays Crystal Reports. It had been working fine. On both my development machine and test environment.

I made a few changes (minor) to the report def and deployed this to my test machine.

This essentially worked. Another problem meant I had to make a few code changes (nothing major). I now find that in the development environment when I run up the code the report fails.

The error is "Load report failed."
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 DMIWeb_proto.Reports.InvProRep(String strProcessID, DataSet ds) in C:\Documents and Settings\andcro.BMIDOMAIN\My Documents\Visual Studio 2008\Projects\DMIWeb_proto\DMIWeb_proto\Reports.cs:line 126"

This is the same report (a copy as it is held on a local drive) and the same code and it had all been working fine.

It fails on the last of these lines of code

        if (File.Exists(filePath))
        {
          rep = new ReportDocument();
          rep.Load(filePath);

Any ideas?

TIA
Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE