IExAnalyzerExporter.ExportChartAsImage

Syntax

ExportChartAsImage: Boolean;

Description

The ExportChartAsImage property determines parameters of chart export when it is exported to XLS (*.xls) files.

Comments

ExportChartAsImage = True. This value is set by default. The chart is exported as an EMF image, it is possible to work with this chart using Microsoft Excel tools.

ExportChartAsImage = False. The chart is exported as an object, and it is possible to work with this chart using Microsoft Excel tools. If the table used as the chart data source is hidden in the report while the chart is displayed, the sheet showing data table is hidden in the export file.

When exporting from the series mode of the time series database, the chart, that is built for calculated series, is exported as an image. These series include:

Charts for all other series are exported in accordance with the value of the ExportChartAsImage property.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT.

Sub Main;
Var
    MB: IMetabase;
    Expr: IEaxAnalyzer;
    ExpExspr: IExAnalyzerExporter;
Begin
    MB := MetabaseClass.Active;
    Expr := MB.ItemById("EXPRESS_REPORT").Bind As IEaxAnalyzer;
    ExpExspr := New ExAnalyzerExporter.Create;
    ExpExspr.ExAnalyzer := Expr;
    ExpExspr.ExportChartAsImage := False;
    Expr.Grid.Refresh;
    ExpExspr.ExportToFile("C:\Analazer.XLS""XLS");
End Sub Main;

After executing the example the express report is exported to the file C:\Analazer.XLS. The chart is exported as a chart and not as an image.

See also:

IExAnalyzerExporter