cancel
Showing results for 
Search instead for 
Did you mean: 

CR2008 - "The system cannot find the path specified"

patrick_simons2
Participant
0 Kudos

Hi,

I have a report designed with CR 2008.

In my VB.Net programm I execute a "CrystalDecisions.CrystalReports.Engine.ReportDocument.Export" to export the report f.ex. to pdf.

This works fine.

Now I add a incorrect formula to the report with {TSQLTable.TField_ThatDoesNotExist} = "Otto".

When I export the report I receive now "The system cannot find the path specified" which does not reflect the real problem.

When showing the report with the incorrect formula in the Viewer, I get the correct error message

This Field name is not known

Details: errorKind

Error in file....

So why doesn't the export show the correct error message?

Thanks

Patrick

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hello Patric

What Service Pack for CR 2008 are you using?

What version of VS?

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

patrick_simons2
Participant
0 Kudos

Hi Ludek,

VS = Visual Studio Team System 2008 SP1

CR = Crystal Reports Developer 2008 SP5

Thanks,

Patrick

former_member183750
Active Contributor
0 Kudos

Hello Patrick

Strange... When I try to reproduce the issue by adding an invalid formula into a report I get the following error:

So, that leads to some head scratching;

Do you see the same behavior with any report?

Are there subreports in the report? If so, remove them and see if the error changes.

Try to run the report in a new one line app:

CrystalreportViewer1.ReportSource = <path to the report?

What happens now?

- Ludek

patrick_simons2
Participant
0 Kudos

Thanks Ludek.

As you can read in my first post, I got the same message as you in the viewer - so far so good.

The wrong message only appears when exporting the incorrect report by code without using the viewer:

CrystalDecisions.CrystalReports.Engine.ReportDocument.Export

Patrick

patrick_simons2
Participant
0 Kudos

Hi Ludek,

any news?

former_member183750
Active Contributor
0 Kudos

Hello Patrick

Well, I added an invalid formula to a report. I then used the following code:

 

Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
      
        crReportDocument.Load(TextBox1.Text)


        Dim exportFilePath As String = Application.StartupPath + "\exported.xls"

        ''Set the options for saving the exported file to disk
        crDiskFileDestinationOptions = New DiskFileDestinationOptions()
        crDiskFileDestinationOptions.DiskFileName = exportFilePath

        ''Set the exporting information
        crExportOptions = crReportDocument.ExportOptions
        With crExportOptions
            .DestinationOptions = crDiskFileDestinationOptions
            .ExportDestinationType = ExportDestinationType.DiskFile
            .ExportFormatType = ExportFormatType.Excel
        End With

        ''Export the report
        crReportDocument.Export()

      

        '' crReportDocument.ExportToDisk(ExportFormatType.Excel, "c:\test\test.xls")
        MessageBox.Show("done")

I then ran a second test with the following code:

Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
      
     crReportDocument.Load(TextBox1.Text)

    crReportDocument.ExportToDisk(ExportFormatType.Excel, "c:\test\test.xls")

        MessageBox.Show("done")

Both of the above had identical behavior. When running in the VS IDE, I got the following exception:

Running the test apps via an app exe, I got:

Both are pretty well what I would expect.

- Ludek

patrick_simons2
Participant
0 Kudos

Could you send me your sample?

former_member183750
Active Contributor
0 Kudos

Sample attached.

As is, the code used will be:

crReportDocument.ExportToDisk(ExportFormatType.Excel, "c:\test\test.xls"

The other way of coding this is commented out. I have also included an rpt file called formulasbad.rpt. That is the report I tested with.

To run the app, all you need to do is hit the exe, type in the path and click the "Run Report" button.

Oh, the file has a .txt extension. After you've downloaded it, rename to zip and extract

- Ludek

patrick_simons2
Participant
0 Kudos

I see your sample uses VS 2010 and a report designed with CR 2011.

Could you make the test with VS 2008 and a CR 2008-report?

Thanks,

Patrick

former_member183750
Active Contributor
0 Kudos

Same error:

- Ludek

former_member183750
Active Contributor
0 Kudos

One ray of... something; I just realized the image I pulled up has SP3 on it. I'll update it and let you know if SP5 is the same or has the issue you are reporting.

- Ludek

patrick_simons2
Participant
0 Kudos

I've you get the correct behavior, could you also send me your VS2008-sample?

Patrick

former_member183750
Active Contributor
0 Kudos

Hmmm, well I guess I'll have to google crow recipes as I have to eat one here...

After I tested exactly the same app and report on CR 2008 SP5, I got the same error you reported. That is just way too weird as CRVS 2010 / 2012 is built off of the same stream as CR 2008. Anyhow, I will be creating an escalation for R&D and I'll post the tracking number here. I am not sure of timeline right now, but I suspect it will be longish. E.g.; more than likely second half of 2013.

- Ludek

Answers (0)