Class PercentOfTotalAggregation
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists.Aggregation
Assembly: SoDataBase.BusinessLogic.dll
Syntax
[AggregationPlugin("Percent")]
public class PercentOfTotalAggregation : AggregationPluginBase, IAggregationTwoPassPlugin, IAggregationPlugin
Constructors
PercentOfTotalAggregation()
Declaration
public PercentOfTotalAggregation()
Fields
PluginName
Declaration
public const string PluginName = "Percent"
Field Value
| Type | Description |
|---|---|
| string |
Methods
AddItem(ArchiveColumnData)
Remember the item for use in detail, accumulate sum for use in header
Declaration
public override ArchiveColumnData AddItem(ArchiveColumnData item)
Parameters
| Type | Name | Description |
|---|---|---|
| ArchiveColumnData | item |
Returns
| Type | Description |
|---|---|
| ArchiveColumnData |
Overrides
Clone()
Clone: Called when creating detail level instances; takes snapshot of last item seen by outer level and saves as the sum to be used in calculations
Declaration
public IAggregationTwoPassPlugin Clone()
Returns
| Type | Description |
|---|---|
| IAggregationTwoPassPlugin |
Remarks
Summary levels accumulate data into SuperOffice.CRM.ArchiveLists.Aggregation.PercentOfTotalAggregation._theSum and that is what should be used as their value; while detail levels receive the SuperOffice.CRM.ArchiveLists.Aggregation.PercentOfTotalAggregation._lastItem, which is what they should use as their value. The lastItem -> sum assignment in this method is where the asymmetry between nested summary levels and the detail level is expressed.
GetAggregatedValue()
Return the aggregate value (output in the footer)
Declaration
public override ArchiveColumnData GetAggregatedValue()
Returns
| Type | Description |
|---|---|
| ArchiveColumnData |
Overrides
SetOutsideValue(IAggregationTwoPassPlugin)
Called on the detail level, with a reference to the same column, but the instance of the aggregator that is in the nearest parent level.
Declaration
public void SetOutsideValue(IAggregationTwoPassPlugin parentInstance)
Parameters
| Type | Name | Description |
|---|---|---|
| IAggregationTwoPassPlugin | parentInstance |
Remarks
To implement a percentage of total, the normal AddItem should store its individual items. The detail level will then be able to access the sum of items, by calling (private) methods on its parent-level instance, and compute its own percentage item afterwards.
ToString()
String output for debugging
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |