SaveToXml: String;
The SaveToXml method saves table formatting styles to the row in the XML format.
To load table formatting styles from the row in the XML format, use the ITabTableStyles.LoadFromXml method.
Executing the example requires that the repository contains a regular report with the REG_REPORT_TAB identifier containing table styles.
Add links to the Metabase, Report, Tab, Xml system assemblies.
Sub UserProc;
Var
mb: IMetabase;
Report: IPrxReport;
Tab: ITabSheet;
Style: ITabTableStyles;
StyleXml: String;
XML: FreeThreadedDOMDocument60;
Begin
mb := MetabaseClass.Active;
// Get regular report
Report := mb.ItemById("REG_REPORT_TAB").Bind As IPrxReport;
// Get table styles
Tab := (Report.ActiveSheet As IPrxTable).TabSheet;
Style := Tab.TableStyles;
// Save table styles to file in the XML format
StyleXml := Style.SaveToXml;
XML := New FreeThreadedDOMDocument60.Create;
XML.loadXML(StyleXml);
XML.save("C:\TableStyles.xml");
End Sub UserProc;
After executing the example table styles from the available report sheet are loaded to the C:\TableStyles.xml file in the XML format.
See also: