I'm not sure if you will have any luck finding that KBA so here is a copy / paste:
Symptom
- Exporting from the Windows Viewer does not prompt for the various Export options as it does in Crystal Reports Designer.
- Exporting from the Windows Viewer does not allow users to select the output file type destination as Application, only allows to save to disk.
- Is there a sample application that demonstrates how to manage this in the Windows .NET Viewer.
Environment
Crystal Reports for Visual Studio 2010
Cause
There is no Export Button Click Event to capture.
Resolution
When Designing reports select the menu File -> Export -> Report Export options
Chose the first format you wish to use and set all properties as required or desired.
Do this for each format option.
Save the report, these default export properties are now saved in the rpt file and will be used the next time the report is exported using the Default Export button of the Viewer.
See the attached sample application that replaces the Crystal Report Viewer Export button with a new button labeled "Export"
Within the application you can now use the default export types as defined in the First Option above or add additional code to handle the specific export options as required by your application.
PLEASE NOTE: Crystal Reports buttons may not be indexed in the same order or have the same ID in each version so this may change when updating your Crystal Reports Runtime.
Where to find the code:
Look in ExportFormat.cs for the defined file types, comment out any you do not want to support or use.
Exportcontrols.cs has the actual export functions.
Also note: Not added to the sample is the use of CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument.get_SavedExportOptions(CrystalDecisions.ReportAppServer.ReportDefModel.CrReportExportFormatEnum)
This API allows the Developer to get the saved report option from the report file.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow me on Twitter
Got Enhancement ideas? Use the SAP Idea Place