CreateElemForEmptyAttr: Boolean;
CreateElemForEmptyAttr: boolean;
The CreateElemForEmptyAttr property determines whether a grouping element with empty value is created.
Available values:
True. A grouping element with empty value is created.
False. A grouping element with empty values is not created. Default value.
Executing the example requires that the repository contains a data entry form with the DEF identifier containing a table area with configured grouping in the sidehead.
Add links to the Express, Metabase and Report system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
Area: IEaxDataArea;
Slice: IEaxDataAreaPivotSlice;
Hier: IEaxHierarchiesGroupSettings;
HierGroup: IEaxHierarchyGroupSettings;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get form child object
Report := MB.ItemById("DEF").Children.Item(0).Edit As IPrxReport;
// Get analytical area of child object
Area := Report.DataArea;
// Get analytical data area slice
Slice := Area.Slices.Item(0) As IEaxDataAreaPivotSlice;
// Get properties of groupings collection
Hier := Slice.EaxHierarchiesGroupSettings;
// Get grouping properties
HierGroup := Hier.EaxHierarhyGroupSettings(0);
Debug.WriteLine("Empty grouping elements are displayed: " + HierGroup.CreateElemForEmptyAttr.ToString);
End Sub UserProc;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Report;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Report: IPrxReport;
Area: IEaxDataArea;
Slice: IEaxDataAreaPivotSlice;
Hier: IEaxHierarchiesGroupSettings;
HierGroup: IEaxHierarchyGroupSettings;
Begin
// Get repository
MB := Params.Metabase;
// Get form child object
Report := MB.ItemById["DEF"].Children.Item[0].Edit() As IPrxReport;
// Get analytical area of child object
Area := Report.DataArea;
// Get analytical data area slice
Slice := Area.Slices.Item[0] As IEaxDataAreaPivotSlice;
// Get properties of groupings collection
Hier := Slice.EaxHierarchiesGroupSettings;
// Get grouping properties
HierGroup := Hier.EaxHierarhyGroupSettings[0];
System.Diagnostics.Debug.WriteLine("Empty grouping elements are displayed: " + HierGroup.CreateElemForEmptyAttr.ToString());
End Sub;
After executing the example the console window displays the result of displaying empty grouping elements.
See also: