InnerStyleSheet: IStyleSheet;
InnerStyleSheet: Prognoz.Platform.Interop.Drawing.StyleSheetClass;
The InnerStyleSheet property determines internal styles table of the express report.
To work with external styles table, use the IEaxAnalyzer.StyleSheet property.
Executing the example requires that repository contains express report with the EXPRESS_STYLE identifier. This report should contain a chart.
Add links to the Drawing, Express, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
Report: IEaxAnalyzer;
Style: IStyleSheet;
StyleCont: IStyleContainer;
StEntity: IStyledEntity;
Begin
// Get current repository
mb := MetabaseClass.Active;
// Get express report
Report := mb.ItemById("EXPRESS_STYLE").Edit As IEaxAnalyzer;
// Get internal styles table
Style := Report.InnerStyleSheet;
// Add styles container to styles table
StyleCont := Style.Add(0, "");
// Get chart formatting style from report
StEntity := Report.Chart.Chart As IStyledEntity;
// Save chart formatting style to styles container
StEntity.SaveStyleToContainer(StyleCont);
// Save changes
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the internal styles table of express report stores chart formatting style.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Express;
…
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
Report: IEaxAnalyzer;
Style: IStyleSheet;
StyleCont: IStyleContainer;
StEntity: IStyledEntity;
Begin
// Get current repository
mb := Params.Metabase;
// Get express report
Report := mb.ItemById["EXPRESS_STYLE"].Edit() As IEaxAnalyzer;
// Get internal styles table
Style := Report.InnerStyleSheet;
// Add styles container to styles table
StyleCont := Style.Add(0, "");
// Get chart formatting style from report
StEntity := Report.Chart.Chart As IStyledEntity;
// Save chart formatting style to styles container
StEntity.SaveStyleToContainer(StyleCont);
// Save changes
(Report As IMetabaseObject).Save();
End Sub;
See also: