Progress® Telerik® Reporting R1 2021
AggregateFunctionAttribute Class
Used to specify the usage and the design time description of the
aggregate function. This class cannot be inherited.
Inheritance Hierarchy
SystemObject
SystemAttribute
Telerik.Reporting.ExpressionsAggregateFunctionAttribute
Namespace:
Telerik.Reporting.ExpressionsSystemAttribute
Telerik.Reporting.ExpressionsAggregateFunctionAttribute
Assembly: Telerik.Reporting (in Telerik.Reporting.dll)
Syntax
The AggregateFunctionAttribute type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | AggregateFunctionAttribute |
Initializes a new instance of the
AggregateFunctionAttribute class.
|
Properties
Name | Description | |
---|---|---|
![]() | Description |
Gets the description of the aggregate function displayed in the
expression builder.
|
![]() | IsVisible |
Gets a value indicating whether the aggregate should be shown at
design time. Default value is true.
|
![]() | Name |
Gets the name of the aggregate function as it should be used in the
expressions.
|
![]() | ReturnType |
Gets or sets the return type of the aggregate function as it should be used in the
expressions.
|
Methods
Name | Description | |
---|---|---|
![]() | Equals |
Indicates whether this attribute instance and a specified object are
equal.
(Overrides AttributeEquals(Object).) |
![]() | GetHashCode |
Returns the hash code for this attribute instance.
(Overrides AttributeGetHashCode.) |
![]() | IsDefaultAttribute |
Determines if this attribute is the default.
(Overrides AttributeIsDefaultAttribute.) |
Fields
Name | Description | |
---|---|---|
![]() ![]() | Default |
Returns the default instance of the attribute with all its
properties set to default values.
|
Examples
This example shows the usage of the attribute.
[AggregateFunction(Description = "Concatenation aggregate. Output: (value1, value2, ...)", Name = "Concatenate")] class ConcatenateAggregate : IAggregateFunction { string result; public void Accumulate(object[] values) { // The aggregate function expects one parameter object value = values[0]; // null values are not aggregated if (null == value) { return; } // The actual accumulation if (this.result.Length > 0) { result += ", "; } this.result += value.ToString(); } public object GetValue() { return string.Format("({0})", this.result); } public void Init() { // Add aggregate function initialization code here if needed this.result = string.Empty; } public void Merge(IAggregateFunction aggregateFunction) { ConcatenateAggregate aggregate = (ConcatenateAggregate)aggregateFunction; if (aggregate.result.Length > 0) { if (this.result.Length > 0) { result += ", "; } this.result += aggregate.result; } } }
Version Information
Supported in: 1.0.1