TdxCustomDashboardControl.ExportToGIF(TStream) Method
Exports dashboard content to a stream in the Graphics Interchange Format (GIF).
Declaration
procedure ExportToGIF(AStream: TStream);
Parameters
| Name | Type | Description |
|---|---|---|
| AStream | TStream | The target stream. |
Remarks
Call the ExportToGIF procedure to export dashboard content to a stream in the GIF format.
The ExportTimeout property allows you to set a timeout interval (in milliseconds) for export operations. If the specified export timeout is reached, an exception is thrown.
Code Example: Export Dashboard Content to a GIF File
The following code example exports content of a configured TdxDashboardControl component to a file in the GIF format using an intermediary TMemoryStream object:
uses
dxDashboard.Control, // Declares the TdxDashboardControl component
dxShellDialogs; // Declares the TdxSaveFileDialog component
// ...
procedure TMyForm.cxButtonExportToGIFClick(Sender: TObject);
var
AStream: TMemoryStream;
begin
if not dxSaveFileDialog1.Execute(Handle) then Exit; // Displays the "Save File" dialog
AStream := TMemoryStream.Create; // Creates a stream as an intermediary container
try
dxDashboardControl1.ExportToGIF(AStream); // Exports content to a stream in the GIF format
AStream.SaveToFile(dxSaveFileDialog1.FileName); // Saves GIF stream content to a file
finally
AStream.Free; // Releases the intermediary memory stream
end;
end;
Related Compiled Demo
To see the dashboard export functionality in action, run the BI Dashboards Designer/Viewer demo in the VCL Demo Center installed with compiled DevExpress VCL demos. Select any demo in the sidebar on the left, click the Export button, and use any export option listed in the menu.
Tip
You can find full source code for the installed compiled Report demo in the following folder:
%PUBLIC%\Documents\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressDashboards\
Other Export Methods
You can call the following procedures to export dashboard content to a stream in other formats:
- ExportTo
- Exports dashboard content to a stream in any supported format.
- ExportToCSV
- Exports dashboard content to a stream in the comma-separated values (CSV) format.
- ExportToJPG
- Exports dashboard content in the JPEG format.
- ExportToPDF
- Exports dashboard content to a stream in the Portable Document Format (PDF).
- ExportToPNG
- Exports dashboard content to a stream in the Portable Network Graphics (PNG) format.
- ExportToSVG
- Exports dashboard content to a stream in the Scalable Vector Graphics (SVG) format.
- ExportToXLS
- Exports dashboard content to a stream in the Microsoft Excel® binary format (XLS).
- ExportToXLSX
- Exports dashboard content to a stream in the Office OpenXML Spreadsheet Format (XLSX).