Consider an example of getting a basis for table building and settings of express report table data display.
Executing the example requires that the repository contains an express report with the EXPRESS identifier, which data source is a standard cube.
Add links to the Express, Metabase and Pivot system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
Totals: IPivotEvaluatorTotals;
HighItem: IPivotHighlightItem;
Filter: IPivotFilterSettings;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
Pivot := Express.Pivot;
//Totals
Totals := Pivot.Evaluator.Totals;
Totals.RowTypes := PivotEvaluatorElementType.Sum + PivotEvaluatorElementType.Max;
Totals.IncludeOwner := True;
Totals.TreatEmptyAsZero := False;
//Highlight data in the range [10;20]
HighItem := Pivot.Highlight.Add;
HighItem.ConditionType := PivotHighlightType.NLAandNGB;
HighItem.ConditionValueA := 10;
HighItem.ConditionValueB := 20;
HighItem.Area := PivotFilterArea.Table;
HighItem.Enabled := True;
//Filter data
Filter := Pivot.Filter As IPivotFilterSettings;
Filter.Enabled := True;
Filter.UseCondition := True;
Filter.ConditionType := PivotFilterType.NEqA;
Filter.ConditionValueA := 25;
// Save changes
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example express report table displays totals, highlighted data in the range [10;20], values not equal to 25 are filtered.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Pivot;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
Totals: IPivotEvaluatorTotals;
HighItem: IPivotHighlightItem;
Filter: IPivotFilterSettings;
Begin
// Get repository
MB := Params.Metabase;
// Get express report
Express := MB.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
Pivot := Express.Pivot;
//Totals
Totals := Pivot.Evaluator.Totals;
Totals.RowTypes := (PivotEvaluatorElementType.peetSum As Integer) + (PivotEvaluatorElementType.peetMax As Integer);
Totals.IncludeOwner := True;
Totals.TreatEmptyAsZero := False;
//Highlight data in the range [10;20]
HighItem := Pivot.Highlight.Add();
HighItem.ConditionType := PivotHighlightType.phtNLAandNGB;
HighItem.ConditionValueA := 10;
HighItem.ConditionValueB := 20;
HighItem.Area := PivotFilterArea.pfaTable;
HighItem.Enabled := True;
//Filter data
Filter := Pivot.Filter As IPivotFilterSettings;
Filter.Enabled := True;
Filter.UseCondition := True;
Filter.ConditionType := PivotFilterType.pftNEqA;
Filter.ConditionValueA := 25;
// Save changes
(Express As IMetabaseObject).Save();
End Sub;
See also: