Symptom
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?
Resolution
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");
System.Diagnostics.Process.Start("C:\\Windows\\temp\\~boExport.pdf");
boReportDocument.Close();
boReportDocument.Dispose();
See Also
Keywords
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