Search Results for

    Show / Hide Table of Contents

    TLinqDataTableState<T> Class

    This class implements support for Linq queries in FlexCelReport. Inherit this class if you want to implement some non-standard Linq query provider. For normal cases, you don't need to do anything since FlexCel already implements a descendant of this class with the default functionality.

    Syntax

    Namespace: FlexCel.Report

    public abstract class TLinqDataTableState<T>: VirtualDataTableState, IDisposable, ILinqDataTableState

    Type Parameters

    Type Parameter Description
    T Type of the object that will be enumerated.

    Constructors

    Name Description
    TLinqDataTableState Creates a new LinqDataTable​State.​

    Methods

    Name Description
    SortData Sorts the data according to SortStr.
    SortDataByField<Q> This method is used by the current SortData implementation, and it creates an expression to sort the data.
    TryAggregate This method is used by the "AGGREGATE" tag in a FlexCel report to calculate the maximum/​minimum/​average/​etc of the values in the table. If you don't implement this method, FlexCel will still calculate those values by looping through the dataset, but if you have a faster way to do it (like with a "select max(field) from table") then implement this method and return true.
    Eof Returns true when at the end of the table.
    GetValue Overloaded
    GetValue(Int32)
    GetValue(Int32, Int32)
    MoveFirst This method is called when we want to move to the first record.
    You can always know the current record with VirtualDataTable​State.​Position
    MoveNext This method is called when we want to move to the next record.
    You can always know the current record with VirtualDataTable​State.​Position
    GetDetail<Q> Returns a detail table. This is used in master-detail relationships to get the nested table for the detail band.
    MoveMasterRecord This method will be called each time that the master datasource moves its position. Use it to filter the data returned if this is used on a master-detail relationship.
    GetFilterAction This method returns a function that can be used to filter the data. This implementation calls SqlFilter when rowFilter starts with "@", or calls [SimpleFilter](SimpleFilter.md) when rowFilter doesn't start with "@". You might want to replace this method by a different one that filters in a different way.
    SimpleFilter This method is called by GetFilterAction when the rowFilter doesn't start with "@"\.<br />It will do a simple parse of the rowFilter string, allowing "AND" "OR" "()" and equality comparisons.
    SqlFilter This method is called by GetFilterAction when the rowFilter starts with "@"\. When overriding [GetFilterAction](GetFilterAction.md) you might want to call this method if rowfilter starts with "@"\.<br /><br /><br />This implementation tries to find a "Where(string)" method in the data and call it.
    FilteredRowCount This method will be called when a Split master wants to know how many records its detail has. For example, if the detail has 30 records and the split is at 10, the Split master will call this method to find out that it has to return 3 on its own record count.
    You need to filter the data here depending on the master detail relationships, but not on the splitLink.
    Dispose Override this method on derived classes.

    Properties

    Name Description
    Data Data for the table. Note that this might change in a master-detail report, every time the master changes its active record, Data in the detail will change to the records for the master.
    Fields A list of then public fields in the datatype.
    Filters A list of filter strings that must be applied to the data.
    SplitLink Split link.
    RowCount Returns the number of rows available on the dataset, for the current state. Note that this method can be called many times, so it should be fast.
    Use a cache if necessary. Do *not* use something like "return select count(*) from table" here, it would be too slow.
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com