Share via


Addendum: Enhancements to the Exporting Code

If you have installed Visual Studio 2005 or later or Crystal Reports you have access to the enhanced API for exporting your Crystal report to multiple formats.

In the enhanced Crystal Reports API, the ExportFormatTypes enum has two new exporting formats: Microsoft Excel records (an .xls file that contains only the data) and text files. To learn how to add code for the new exporting formats, see Creating Methods for the New Exporting Formats.

In addition, you now have the following enhanced exporting methods in the ReportDocument class:

  • ExportToDisk(CrystalDecisions.Shared.ExportFormatType formatType, string fileName): exports a report to the local drive of the Web server or to the Windows machine.

    For more information, see Using the ExportToDisk() Method.

  • ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType formatType, System.Web.HttpResponse response, bool asAttachment, string attachmentName): exports a report in the specified format type to a browser window, or it exports the report as an attachment.

    For more information, see Using the ExportToHttpResponse() Method.

  • ExportToHttpResponse(CrystalDecisions.Shared.ExportOptions options, System.Web.HttpResponse response, bool asAttachment, string attachmentName): exports a report in the specified format type to a browser window, or it exports the report as an attachment.

    For more information, see Using the ExportToHttpResponse() Method.

  • ExportToStream(CrystalDecisions.Shared.ExportFormatType formatType): exports a report's data in the specified format type to an input/output stream.

    For more information, see Using the ExportToStream() Method.

In this section: