on 01-07-2014 10:06 AM
Dear all
I am trying to create a simple console-based C# application that opens crystal reports and exports them as PDF files. I've found many examples for this on the web but I just can't get it to work. It compiles without errors/warnings but crashes at runtime.
I'm using Crystal Report 11.0.0.1282 and Visual Studio 2010 with .Net framework 4.5 on Windows 7, 64bit.
cryRpt = new ReportDocument();
cryRpt.Load("test.rpt");
Then I get:
System exception: 'COMM_FAILURE'
Reason: error number WSAEINVAL
Completed: no
Minor code: 1330577413 (socket() failed)
If I then try to export the report:
cryRpt.ExportToDisk(ExportFormatType.PortableDocFormat, "test.pdf");
The program crashes:
System.TypeLoadException: Method 'ISCREditableRTFExportFormatOptions_reserved5' on type 'CrystalDecisions.ReportAppServer.ReportDefModel.EditableRTFExportFormatOptionsClass' from assembly 'CrystalDecisions.ReportAppServer.ReportDefModel, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' is overriding a method that has been overridden.
at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.DotNetExportOptionsToEromExportOptions(ExportOptions exportOptions)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName)
at Crystal_to_PDF.Program.Main(String[] args) in \\zrh-s107\usersb$\vbfaw\daten\visual studio 2010\Projects\Crystal\Crystal_to_PDF\Program.cs:line 41
Any ideas what might be the problem?
regards
lukas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I uploaded the install exe for you to the ftp server. If that fails, things are not as they should be on your end. Let me know...
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
Hi Leslie,
There are no known issues exporting to PDF in CR for VS 2010 SP8. OK , so there may be the odd one but usually unique issues...
Just a reminder, Crystal Reports is NOT a Database Archiving tool so don't try exporting a years worth of data to PDF, it won't work....
You are/were using an unsupported environment... so no idea why it fails.
Don
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.