SaveToXml(SType: BubbleChartSerializationType): String;
SaveToXml(SType: Prognoz.Platform.Interop.Chart.BubbleChartSerializationType): String;
SType. Portion of bubble chart settings to be saved to XML.
The SaveToXml method saves bubble chart settings to an XML structure and gets the resulting value.
Later, the saved portion of the XML markup text can be loaded using the LoadFromXML method.
Executing this example requires two express reports with the identifiers EXPRESS_REPORT and EXPRESS_REPORT_2. The express reports are configured to ensure bubble chart displaying and operation.
Sub UserProc;
Var
MB: IMetabase;
Eax1, Eax2: IEaxAnalyzer;
Bubble1, Bubble2: IBubbleChart;
BubbleXML: String;
Begin
MB := MetabaseClass.Active;
Eax1 := MB.ItemById("EXPRESS_REPORT").Bind As IEaxAnalyzer;
Eax2 := MB.ItemById("EXPRESS_REPORT_2").Edit As IEaxAnalyzer;
//Bubble charts
Bubble1 := Eax1.BubbleChart.Chart;
Bubble2 := Eax2.BubbleChart.Chart;
BubbleXML := Bubble1.SaveToXml(BubbleChartSerializationType.Settings);
Bubble2.LoadFromXml(BubbleXML, BubbleChartSerializationType.Settings);
(Eax2 As IMetabaseObject).Save;
End Sub UserProc;
After executing the example formatting of the bubble chart in the second express report is set as identical to formatting of the bubble chart in the first express report. Formatting is saved to and loaded from XML to pass it between reports.
Executing this example requires two express reports with the identifiers EXPRESS_REPORT and EXPRESS_REPORT_2. The express reports are configured to ensure bubble chart displaying and operation. This procedure is an entry point for a .NET assembly.
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Metabase;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Eax1, Eax2: IEaxAnalyzer;
Bubble1, Bubble2: IBubbleChart;
BubbleXML: String;
Begin
MB := Params.Metabase;
Eax1 := MB.ItemById["EXPRESS_REPORT"].Bind() As IEaxAnalyzer;
Eax2 := MB.ItemById["EXPRESS_REPORT_2"].Edit() As IEaxAnalyzer;
//Bubble charts
Bubble1 := Eax1.BubbleChart.Chart;
Bubble2 := Eax2.BubbleChart.Chart;
BubbleXML := Bubble1.SaveToXml(BubbleChartSerializationType.bcstSettings);
Bubble2.LoadFromXml(BubbleXML, BubbleChartSerializationType.bcstSettings);
(Eax2 As IMetabaseObject).Save();
End Sub;
After executing the example formatting of the bubble chart in the second express report is set as identical to formatting of the bubble chart in the first express report. Formatting is saved to and loaded from XML to pass it between reports.
See also: