TdxReportUIExportFormats Type
A set of flags that correspond to report data export formats.
Declaration
TdxReportUIExportFormats = set of TdxReportUIExportFormat;
Referenced Class
| Type | Description |
|---|---|
| TdxReportUIExportFormat | A flag that indicates a report export data format. |
Remarks
A TdxReportUIExportFormats value can include any combination of TdxReportExportFormat flags to indicate data formats for report export operations.
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;
Direct TdxReportUIExportFormats Type Reference
The following properties reference the TdxReportUIExportFormats type:
- TdxReport.ExportFormats
- Specifies export formats available in the Report Viewer dialog.
- TdxCustomReportControl.ExportFormats
- Specifies export formats available in the TdxReportControl and Report Viewer UI.
See Also