SAP Knowledge Base Article - Public

1205111 - How to export a Crystal Report to an Application using the CR .NET SDK?


The Windows and web form viewers for the CR .NET SDK don't offer Application as a destination option. How can a Crystal Report be exported to an application with the CR .NET SDK?


You can export a report to disk using the ExportToDisk method then use the System.Diagnostic.Process.Start method to open the file using the computer's default program for the file type.

CrystalDecisions.CrystalReports.Engine.ReportDocument boReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
boReportDocument.Load(Application.StartupPath + "\\..\\..\\World Sales Report.rpt");

// You will need to clean up the exported files at a later time in your application. 

boReportDocument.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, "C:\\Windows\\temp\\~boExport.pdf");



See Also


Export to application, .NET app,Crystal Reports XI,Crystal Report XI R2 , 8177468, CRNET, NET , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , How To


SAP Crystal Reports, developer version for Microsoft Visual Studio ; SAP Crystal Reports, version for Visual Studio .NET 2008