Share via


ExportOptions Class

Provides properties for retrieving and setting options for exporting your report.

Namespace CrystalDecisions.Shared Assembly CrystalDecisions.Shared (CrystalDecisions.Shared.dll)

Syntax

'Declaration
Public Class ExportOptions
    Implements ICloneable
public class ExportOptions : ICloneable

Remarks

The ExportOptions object can be retrieved through the ExportOptions Property of the ReportDocument object.

Example

The following example creates an ExportOptions object and uses it to export a report to disk.

'Declaration

      Private Sub ExportToDisk(ByVal fileName As String)
      
         Dim diskOpts As DiskFileDestinationOptions = _
            ExportOptions.CreateDiskFileDestinationOptions()
      
         Dim exportOpts As ExportOptions = New ExportOptions()
         exportOpts.ExportFormatType = _
            ExportFormatType.RichText
         exportOpts.ExportDestinationType = _
            ExportDestinationType.DiskFile
      
         diskOpts.DiskFileName = fileName
         exportOpts.ExportDestinationOptions = diskOpts
      
         myReportDocument.Export(exportOpts)
      
      End Sub
      
      static void ExportToDisk (String* fileName)
      {
         DiskFileDestinationOptions* diskOpts = 
            ExportOptions::CreateDiskFileDestinationOptions();
      
         ExportOptions* exportOpts = new ExportOptions();
         exportOpts->ExportFormatType =
            ExportFormatType::RichText;
         exportOpts->ExportDestinationType =
            ExportDestinationType::DiskFile;
      
         diskOpts->DiskFileName = fileName;
         exportOpts->ExportDestinationOptions = diskOpts;
      
         reportDocument->Export(exportOpts);
      };
      
      private void ExportToDisk (string fileName)
      {
         DiskFileDestinationOptions diskOpts = 
            ExportOptions.CreateDiskFileDestinationOptions();
      
         ExportOptions exportOpts = new ExportOptions();
         exportOpts.ExportFormatType =
            ExportFormatType.RichText;
         exportOpts.ExportDestinationType =
            ExportDestinationType.DiskFile;
      
         diskOpts.DiskFileName = fileName;
         exportOpts.ExportDestinationOptions = diskOpts;
      
         reportDocument.Export(exportOpts);
      }
      

Inheritance Hierarchy

Object
   ExportOptions

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

ExportOptions Members
CrystalDecisions.Shared Namespace