
| Visual Basic (Declaration) | |
|---|---|
Public NotInheritable Class HierarchyBuilder Inherits AttributeBuilder | |
| C# | |
|---|---|
public sealed class HierarchyBuilder : AttributeBuilder | |
This class represents a mutable hierarchy object.
Most of the methods that modify an instance of this class return a reference to that same instance. Since a reference to the instance is returned, you can call a method or property on the reference. This can be convenient if you want to write a single statement that chains successive operations one after another.
| C# | Copy Code |
|---|---|
// Create attribute 'Order Date' HierarchyBuilder hierarchy = new HierarchyBuilder("Order Date") // Add 3 levels: Year, Quarter and Month. .AddLevels( new LevelBuilder("Year").SetExpression<int>("=Fields!OrderDate_Year.Value"), new LevelBuilder("Quarter") .SetExpression<int>("=Fields!OrderDate_Quarter.Value") // Set caption like 'Q1 2008' .SetCaptionExpression( "=\"Q\" & Fields!OrderDate_Quarter.Value & \" \" & Fields!OrderDate_Year.Value") , new LevelBuilder("Month") .SetExpression<int>("=Fields!OrderDate_Month.Value") // Set caption like 'June, 2008' .SetCaptionExpression( "=MonthName(Fields!OrderDate_Month.Value) & \", \" & Fields!OrderDate_Year.Value") ); | |
System.Object
GrapeCity.ActiveAnalysis.Schema.SchemaItemBuilder
GrapeCity.ActiveAnalysis.Schema.FieldBuilder
GrapeCity.ActiveAnalysis.Schema.FieldBuilder<T>
GrapeCity.ActiveAnalysis.Schema.AttributeBuilder
GrapeCity.ActiveAnalysis.Schema.HierarchyBuilder
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2