Hi ,
I have an application to export data in PDF format. I am using Crystal report 2016 edition. While trying to export file from CR 2016 in C# code I got the exception "Report Application Server failed".
Here is the code used by me:
string extension = crptModel.strExportFilePath.Contains(".pdf") ? ReportFormatType.pdf.ToString() : ReportFormatType.crt.ToString();
ExportOptions CrExportOptions;
DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
PdfRtfWordFormatOptions CrFormatTypeOptions = new PdfRtfWordFormatOptions(); CrDiskFileDestinationOptions.DiskFileName = crptModel.strExportFilePath;
CrExportOptions = reportDocObject.ExportOptions; { CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
CrExportOptions.ExportFormatType = (extension.ToLower() == ReportFormatType.pdf.ToString() ? ExportFormatType.PortableDocFormat : ExportFormatType.WordForWindows);
CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions; CrExportOptions.FormatOptions = CrFormatTypeOptions; }
reportDocObject.Export();
Thanks
Request clarification before answering.
Latest SP is the only one supported.
And why are you mixing export types?
CrExportOptions.ExportFormatType = (extension.ToLower() == ReportFormatType.pdf.ToString() ? ExportFormatType.PortableDocFormat : ExportFormatType.WordForWindows);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
CR Designer no longer ships with the .NET SDK package.
Go here to read all about the latest release and download the Installer:
https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.