Skip to main content
All docs
V26.1
  • TdxReportExportFormat Enum

    Enumerates formats available for report export operations.

    Declaration

    TdxReportExportFormat = (
        CSV,
        DOCX,
        HTML,
        Image,
        MHT,
        PDF,
        RTF,
        Text,
        XLS,
        XLSX
    );

    Members

    Name Description Format-Specific Export Methods
    CSV

    Comma-Separated Values (CSV)

    DOCX

    Office Open XML Document (DOCX)

    HTML

    Hypertext Markup Language (HTML)

    Image

    Image Export Format

    The actual image format depends on Image Export Options available

    in the Report Viewer dialog (the default image export format is PNG).

    MHT

    MIME HTML Document Format (MHT/MHTML)

    PDF

    Portable Document Format (PDF)

    RTF

    Rich Text Format (RTF)

    Text

    Plain text format (TXT)

    XLS

    Microsoft Excel® Binary Format (XLS)

    XLSX

    Office OpenXML Spreadsheet Format (XLSX)

    Remarks

    The Report Viewer dialog lists multiple export formats and corresponding settings available to users:

    VCL Reports: Export Formats Available in the Report Designer Dialog

    Users can configure each available export format in the Export Options pane.

    Note

    TdxReportExportFormat is a scoped enumeration type. Use the type name together with a scope resolution token (. in Delphi or :: in C++Builder) followed by an enumeration value to refer to this value. For example, use TdxReportExportFormat.XLSX (in Delphi) or TdxReportExportFormat::XLSX (in C++Builder) to refer to the XLSX value in code.

    Code Example: Load and Populate Report Templates from Datasets

    This code example loads an XML-based report template (REPX) from a dataset, configures export settings, populates the template with data from another dataset, and displays the report preview:

    uses
      dxReport,  // Declares the TdxReport component and related types
      dxBackend.ConnectionString.JSON.DataSet;  // Declares the TdxBackendDataSetJSONConnection component
    // ...
    
    procedure TMyForm.Button1Click(Sender: TObject);
    var
      ADataConnection: TdxBackendDataSetJSONConnection;
      AReport: TdxReport;
      ALayoutStream: TStream;
    begin
      ADataConnection := TdxBackendDataSetJSONConnection.Create(Self);
      try
        ADataConnection.Name := 'DataSetJSONData';
        ADataConnection.DataSets.Add('Data', FDataSource);
        AReport := TdxReport.Create(Self);
        try
          AReport.ReportName := 'Report';
          ALayoutStream := FLayoutDataSet.CreateBlobStream(FLayoutDataSet.FieldByName('Layout'), bmRead);
          try
            AReport.Layout.LoadFromStream(ALayoutStream);
          finally
            ALayoutStream.Free;
          end;
          AReport.Language := 'fr-FR';
          AReport.ExportFormats := [TdxReportUIExportFormat.PDF,
            TdxReportUIExportFormat.RTF, TdxReportUIExportFormat.HTML];
          AReport.FilterString := 'id = 5';
          AReport.ShowViewer;
        finally
          AReport.Free;
        end;
      finally
        ADataConnection.Free;
      end;
    end;
    

    TdxReportExportFormat Type References in Method Parameters

    Report Component

    TdxReport.ExportTo(TdxReportExportFormat,TStream)
    Exports report content to a stream in any supported format.
    TdxReport.ExportTo(TdxReportExportFormat,TStream,String)
    Exports report content to a stream in any supported format. Additionally returns the corresponding report file name.
    TdxReport.ExportTo(TdxReportExportFormat,String)
    Exports report content to a file in any supported format.

    Report Control

    TdxCustomReportControl.ExportTo(TdxReportExportFormat,TStream)
    Exports report content to a stream in any supported format.
    TdxCustomReportControl.ExportTo(TdxReportExportFormat,TStream,String)
    Exports report content to a stream in any supported format. Additionally returns the corresponding report file name.
    TdxCustomReportControl.ExportTo(TdxReportExportFormat,String)
    Exports report content to a file in any supported format.
    See Also