cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Error "Report Application Server failed" while exporting in C# code

07-18-2020 2:26 PM
669 views 3 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

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

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

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);

Answers (1)

Answers (1)

0 Likes

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

Former Member
0 Likes

Hi ,

Thanks for your update. I still have one query

I am using CRforVS13SP26_0-10010309 sdk. Do I need to move to Service Pack 27