on 02-20-2013 2:26 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.