Class Total
Represents a total that is used to calculate aggregates such as Sum, Min, Max, Avg, Count.
Implements
Inherited Members
Namespace: FastReport.Data
Assembly: FastReport.OpenSource.dll
Syntax
public class Total : Base, IFRSerializable
Constructors
Total()
Initializes a new instance of the Total class with default settings.
Declaration
public Total()
Properties
EvaluateCondition
Gets or sets the condition which tells the total to evaluate.
Declaration
public string EvaluateCondition { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Evaluator
Gets or sets the evaluator databand.
Declaration
public DataBand Evaluator { get; set; }
Property Value
Type | Description |
---|---|
DataBand |
Remarks
The total will be calculated for each row of this band.
Expression
Gets or sets the expression used to calculate the total.
Declaration
public string Expression { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IncludeInvisibleRows
Gets or sets a value that determines if invisible rows of the Evaluator should be included into the total's value.
Declaration
public bool IncludeInvisibleRows { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PrintOn
Gets or sets the band to print the total on.
Declaration
public BandBase PrintOn { get; set; }
Property Value
Type | Description |
---|---|
BandBase |
Remarks
The total will be resetted after the specified band has been printed.
ResetAfterPrint
Gets or sets a value that determines whether the total should be resetted after print.
Declaration
public bool ResetAfterPrint { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ResetOnReprint
Gets or sets a value that determines whether the total should be resetted if printed on repeated band (i.e. band with "RepeatOnEveryPage" flag).
Declaration
public bool ResetOnReprint { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Resetter
This property is kept for compatibility only.
Declaration
public BandBase Resetter { get; set; }
Property Value
Type | Description |
---|---|
BandBase |
Restrictions
This property is not relevant to this class.
Declaration
public Restrictions Restrictions { get; set; }
Property Value
Type | Description |
---|---|
Restrictions |
TotalType
Gets or sets the total type.
Declaration
public TotalType TotalType { get; set; }
Property Value
Type | Description |
---|---|
TotalType |
Value
Gets the value of total.
Declaration
public object Value { get; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
Assign(Base)
Copies the contents of another, similar object.
Declaration
public override void Assign(Base source)
Parameters
Type | Name | Description |
---|---|---|
Base | source | Source object to copy the contents from. |
Overrides
Remarks
Call Assign to copy the properties from another object of the same type. The standard form of a call to Assign is
destination.Assign(source);
which tells the destination object to copy the contents of the source object to itself. In this method, all child objects are ignored. If you want to copy child objects, use the AssignAll(Base) method.
See Also
Clear()
Clears the object's state.
Declaration
public override void Clear()
Overrides
Remarks
This method also disposes all object's children.
GetExpressions()
Gets all expressions contained in the object.
Declaration
public override string[] GetExpressions()
Returns
Type | Description |
---|---|
System.String[] | Array of expressions or null if object contains no expressions. |
Overrides
Remarks
Do not call this method directly. You may override it if you are developing a new component for FastReport.
This method is called by FastReport each time before run a report. FastReport do this to collect all expressions and compile them. For example, GetExpressions method of the TextObject class parses the text and returns all expressions found in the text.
Serialize(FRWriter)
Serializes the object.
Declaration
public override void Serialize(FRWriter writer)
Parameters
Type | Name | Description |
---|---|---|
FRWriter | writer | Writer object. |
Overrides
Remarks
Do not call this method directly. You should override it if you are developing a new component for FastReport.
This method is called when the object needs to save the state. It may happen when:
- saving the report to the file or stream;
- saving the report to the designer's undo buffer;
- assigning the object to another object using the Assign(Base) or AssignAll(Base) methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).