Share via

Tutorial: Exporting to Multiple Formats: Introduction

In this tutorial, you learn how to export the report programmatically. Crystal Reports can export to a wide variety of formats. The options available to you depend on the version of Crystal Reports that you have installed.

Every version of Crystal Reports for Visual Studio supports the following export options:

  • Crystal Reports (RPT)
  • PDF
  • Rich Text Format (RTF)
  • Microsoft Word (97-2003)
  • Microsoft Excel (97-2003)
  • Microsoft Excel (97-2003) Data-Only
  • HTML 3.2
  • HTML 4.0

Crystal Reports Developer supports these additional formats:

  • Seperated Values (CSV)
  • Microsoft Word - Editable (RTF)
  • Tab Separated Text (TTX)
  • Text

You can select any of those formats, click the Export button for the CrystalReportViewer control, and export a report in the selected format to your local machine that runs Crystal Reports in a Web or Windows application.

You can also export reports programmatically, to specific directories on the local Web server or Windows machine.

To begin this tutorial, you add a DropDownList control to your Web or Windows Form, and then populate it with the values from the ExportFormatType enum in the CrystalDecisions.Shared namespace.

Then, you create three private helper methods that contain the export functionality and that perform specific configuration for each of the export formats.

Finally, you create a click event method from a Button control on the Web or Windows Form, and call the three private helper methods that perform the export.