ChartAsImage: Boolean;
ChartAsImage: boolean;
The ChartAsImage property determines whether charts can be displayed in a regular report using the HighChart component.
By default the property is set to False.
If this property is set to True, charts and maps in the Web application are shown as images.
If this property is set to False, the Web application shows chart as a HighChart.
This property is not available in the interface.
Executing the example requires a chart in the regular report with the REGULAR_REPORT identifier. Add links to the Report, Tab, Chart and Metabase system assemblies.
Sub UserProc;
Var
Report: IPrxReport;
Chart: IChart;
Sheet: ITabSheet;
MB: IMetabase;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
Sheet := (Report.Sheets.Item(0) As IPrxTable).TabSheet;
Chart := Sheet.Objects.Item(0).Extension As IChart;
Chart.ChartAsImage := False;
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example in a Web application, the HighChart chart is shown in the report.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Chart;
Public Shared Sub Main(Params: StartParams);
Var
Report: IPrxReport;
Chart: IChart;
Sheet: ITabSheet;
MB: IMetabase;
Begin
MB := Params.Metabase;
Report := MB.ItemById["REGULAR_REPORT"].Edit() As IPrxReport;
Sheet := (Report.Sheets.Item[0] As IPrxTable).TabSheet;
Chart := Sheet.Objects.Item[0].Extension As IChart;
Chart.ChartAsImage := False;
(Report As IMetabaseObject).Save();
End Sub;
See also: