Search Results for

    Show / Hide Table of Contents

    Class MeasureField

    Measure field

    Inheritance
    System.Object
    ContainerField
    MeasureField
    Inherited Members
    ContainerField.container
    ContainerField.name
    ContainerField.caption
    ContainerField.captionWidth
    ContainerField.bindCaptionWidth
    ContainerField.alignment
    ContainerField.LightRedrawChanged()
    ContainerField.FullRedrawChanged()
    ContainerField.FullRebuildChanged()
    ContainerField.Name
    ContainerField.Caption
    ContainerField.CaptionWidth
    ContainerField.BindCaptionWidth
    ContainerField.BeginUpdate()
    ContainerField.EndUpdate()
    ContainerField.Index
    ContainerField.Alignment
    Namespace: FastReport.Olap.Slice
    Assembly: FastReport.Olap.dll
    Syntax
    public class MeasureField : ContainerField

    Constructors

    MeasureField(Slice)

    Don't use this contructor in code. For internal use only.

    Declaration
    public MeasureField(Slice slice)
    Parameters
    Type Name Description
    Slice slice

    Reference to Slice

    MeasureField(Slice, AggregateFunction, SliceField)

    Create new Measure

    Declaration
    public MeasureField(Slice slice, AggregateFunction aggregateFunction, SliceField baseSliceField)
    Parameters
    Type Name Description
    Slice slice

    Reference to Slice

    AggregateFunction aggregateFunction

    Aggregate function

    SliceField baseSliceField

    Slice field which is used as base for aggregation

    MeasureField(Slice, AggregateFunction, SliceField, SliceField, SliceField, String, String, Boolean)

    Create new Measure

    Declaration
    public MeasureField(Slice slice, AggregateFunction aggregateFunction, SliceField baseSliceField, SliceField distinctSliceField, SliceField extraSliceField, string name, string caption, bool distinct)
    Parameters
    Type Name Description
    Slice slice

    Reference to Slice

    AggregateFunction aggregateFunction

    Aggregate function

    SliceField baseSliceField

    Slice field which is used as base for aggregation

    SliceField distinctSliceField

    Slice field which is used to distinct values

    SliceField extraSliceField

    Additional slice field which is used for some aggregations (AggregateFunction.WeightedMean)

    System.String name

    Field name

    System.String caption

    Field caption

    System.Boolean distinct

    Calculate for distinct values

    MeasureField(Slice, String, String, String)

    Create measure field with Expression

    Declaration
    public MeasureField(Slice slice, string expression, string name, string caption)
    Parameters
    Type Name Description
    Slice slice

    Reference to Slice

    System.String expression

    Expression to run

    System.String name

    Field name

    System.String caption

    Field caption

    Properties

    AggregateFunction

    Measure aggregate function (Sum, Count, ...)

    Declaration
    public AggregateFunction AggregateFunction { get; set; }
    Property Value
    Type Description
    AggregateFunction

    AggregateFunctionTotals

    Total aggregate function (Sum, Count, ...)

    Declaration
    public AggregateFunction AggregateFunctionTotals { get; set; }
    Property Value
    Type Description
    AggregateFunction

    BaseSliceField

    Slice field which is used for the Measure

    Declaration
    public SliceField BaseSliceField { get; set; }
    Property Value
    Type Description
    SliceField

    CalcTotalsOnTotals

    Defines whether to calculate totals using totals or using source records. E.g.: averge will differ if it use values from previously calculated avergate totals than source records values

    Declaration
    public bool CalcTotalsOnTotals { get; set; }
    Property Value
    Type Description
    System.Boolean

    CalculateAllCells

    Defines whether to calculate all cells or only those cells which have values in source records. Only for script aggregates.

    Declaration
    public bool CalculateAllCells { get; set; }
    Property Value
    Type Description
    System.Boolean

    CalculateAllTotalCells

    Defines whether to calculate total cells even if they are not going to be calculated according to cells. E.g. if all cells are empty then total cell is also going to be empty and if the property is False then engine will not call script to get total value. But if property is set to True the script will be executed.

    Declaration
    public bool CalculateAllTotalCells { get; set; }
    Property Value
    Type Description
    System.Boolean

    Calculated

    Flag which indicates that Measure is calculated in script

    Declaration
    public bool Calculated { get; }
    Property Value
    Type Description
    System.Boolean

    CalculatedTotals

    Flag which indicates that Total is calculated in script

    Declaration
    public bool CalculatedTotals { get; }
    Property Value
    Type Description
    System.Boolean

    CalculateEvent

    Gets or sets a script method name that will be used to handle the Calculate event.

    Declaration
    public string CalculateEvent { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    See the Calculate event for more details.

    CalculateFilterEvent

    Gets or sets a script method name that will be used to handle the CalculateFilter event.

    Declaration
    public string CalculateFilterEvent { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    See the CalculateFilter event for more details.

    CalculateTotalsEvent

    Gets or sets a script method name that will be used to handle the CalculateTotals event.

    Declaration
    public string CalculateTotalsEvent { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    See the CalculateTotals event for more details.

    ChangeNULLtoZero

    Use 0 for null value

    Declaration
    public bool ChangeNULLtoZero { get; set; }
    Property Value
    Type Description
    System.Boolean

    DisplayFormat

    Declaration
    public override FormatBase DisplayFormat { get; set; }
    Property Value
    Type Description
    FormatBase
    Overrides
    ContainerField.DisplayFormat

    DisplayValueAs

    Show values, percents and ranks

    Declaration
    public DisplayValueAs DisplayValueAs { get; set; }
    Property Value
    Type Description
    DisplayValueAs

    Distinct

    Whether to handle all values or only distinct values for measure value

    Declaration
    public bool Distinct { get; set; }
    Property Value
    Type Description
    System.Boolean

    DistinctSliceField

    If Distinct is set to True defines Slice field to check for distinct values

    Declaration
    public SliceField DistinctSliceField { get; set; }
    Property Value
    Type Description
    SliceField

    DistinctTotals

    Whether to handle all values or only distinct values for total value

    Declaration
    public bool DistinctTotals { get; set; }
    Property Value
    Type Description
    System.Boolean

    Expression

    Gets or sets an expression that calculates measure cell values.

    Declaration
    public string Expression { get; set; }
    Property Value
    Type Description
    System.String

    ExpressionFilter

    Gets or sets an expression that calculates measure filter.

    Declaration
    public string ExpressionFilter { get; set; }
    Property Value
    Type Description
    System.String

    ExpressionTotals

    Gets or sets an expression that calculates measure total values.

    Declaration
    public string ExpressionTotals { get; set; }
    Property Value
    Type Description
    System.String

    ExtendDisplayValueAsOnRow

    Add rows or cols to show percents and ranks

    Declaration
    public bool ExtendDisplayValueAsOnRow { get; set; }
    Property Value
    Type Description
    System.Boolean

    ExtraSliceField

    Defines additional slice field for aggregates which requires 2 values. E.g. WeightedMean aggregate.

    Declaration
    public SliceField ExtraSliceField { get; set; }
    Property Value
    Type Description
    SliceField

    Height

    Height of the measure cell

    Declaration
    public int Height { get; set; }
    Property Value
    Type Description
    System.Int32

    Highlights

    Reference to list of highlights set for the measure

    Declaration
    public CustomHighlights Highlights { get; set; }
    Property Value
    Type Description
    CustomHighlights

    MeasuresContainer

    Reference to container

    Declaration
    public MeasuresContainer MeasuresContainer { get; }
    Property Value
    Type Description
    MeasuresContainer

    ScriptOrder

    Order of calculated aggregate amoung other calculated measures

    Declaration
    public int ScriptOrder { get; set; }
    Property Value
    Type Description
    System.Int32

    ScriptOrderTotals

    Order of calculated total aggregate amoung other calculated totals

    Declaration
    public int ScriptOrderTotals { get; set; }
    Property Value
    Type Description
    System.Int32

    TotalConflictResolve

    Declaration
    public TotalsConflictResolve TotalConflictResolve { get; set; }
    Property Value
    Type Description
    TotalsConflictResolve

    TotalPosition

    Totals position of Measure

    Declaration
    public TotalPosition TotalPosition { get; set; }
    Property Value
    Type Description
    TotalPosition

    UseDifferentAggregateFunctionForTotals

    Defines whether to use the same aggregate function for regular and total cells or to use different aggregate function for totals

    Declaration
    public bool UseDifferentAggregateFunctionForTotals { get; set; }
    Property Value
    Type Description
    System.Boolean

    UseXAxisTotalsAsBase

    If we calculate totals using totals we need to decide which Axis to use for base totals If True - use X Axis, if False - Y Axis

    Declaration
    public bool UseXAxisTotalsAsBase { get; set; }
    Property Value
    Type Description
    System.Boolean

    ValueType

    Declaration
    public Type ValueType { get; }
    Property Value
    Type Description
    System.Type

    Visible

    Sets visibility of the Measure

    Declaration
    public bool Visible { get; set; }
    Property Value
    Type Description
    System.Boolean

    Width

    Width of the measure cell

    Declaration
    public override int Width { get; set; }
    Property Value
    Type Description
    System.Int32
    Overrides
    ContainerField.Width

    Methods

    GetExpressions()

    Gets all expressions contained in the object.

    Declaration
    public Expression[] GetExpressions()
    Returns
    Type Description
    Expression[]

    Array of expressions or null if object contains no expressions.

    Remarks

    Do not call this method directly.

    This method is called by FastCube each time before building a slice. FastCube do this to collect all expressions and compile them.

    InvokeEvent(String, Object)

    Invokes script event.

    Declaration
    public void InvokeEvent(string name, object param)
    Parameters
    Type Name Description
    System.String name

    Name of the event to invoke.

    System.Object param

    Event parameters.

    Remarks

    Do not call this method directly. You should use it if you are developing a new aggregate function for FastCube.

    Use this method to call an event handler that is located in the slice's script.

    Load(XmlItem, Int32)

    Load Measure settings from XML

    Declaration
    public override void Load(XmlItem item, int version)
    Parameters
    Type Name Description
    XmlItem item

    Item to load settings from

    System.Int32 version

    Format version

    Overrides
    ContainerField.Load(XmlItem, Int32)

    OnCalculate(CalculateMeasureEventArgs)

    This method fires the Calculate event and the script code connected to the CalculateEvent.

    Declaration
    public void OnCalculate(CalculateMeasureEventArgs e)
    Parameters
    Type Name Description
    CalculateMeasureEventArgs e

    Event data.

    OnCalculateFilter(CalculateFilterEventArgs)

    This method fires the Calculate event and the script code connected to the CalculateEvent.

    Declaration
    public void OnCalculateFilter(CalculateFilterEventArgs e)
    Parameters
    Type Name Description
    CalculateFilterEventArgs e

    Event data.

    OnCalculateTotals(CalculateMeasureEventArgs)

    This method fires the CalculateTotals event and the script code connected to the CalculateTotalsEvent.

    Declaration
    public void OnCalculateTotals(CalculateMeasureEventArgs e)
    Parameters
    Type Name Description
    CalculateMeasureEventArgs e

    Event data.

    Save(XmlItem)

    Save measure settings to XML

    Declaration
    public override void Save(XmlItem item)
    Parameters
    Type Name Description
    XmlItem item

    XML item to store settings

    Overrides
    ContainerField.Save(XmlItem)

    Events

    Calculate

    Allows to calculate cell value.

    Declaration
    public event CalculateMeasureEventHandler Calculate
    Event Type
    Type Description
    CalculateMeasureEventHandler

    CalculateFilter

    Allows to set cell filtering.

    Declaration
    public event CalculateFilterEventHandler CalculateFilter
    Event Type
    Type Description
    CalculateFilterEventHandler

    CalculateTotals

    Allows to calculate total value.

    Declaration
    public event CalculateMeasureEventHandler CalculateTotals
    Event Type
    Type Description
    CalculateMeasureEventHandler
    Back to top © 1998-2024 Copyright Fast Reports Inc.