Search Results for

    Show / Hide Table of Contents

    TVirtualDataTableState Class

    A table that corresponds to a band on the report. Make sure you read 'Appendix virtual datasets' in the Reports Developer Guide for more information.

    Syntax

    Unit: FlexCel.Report

    TVirtualDataTableState = class(TFlexCelObject);

    Constructors

    Name Description
    Create Constructs a new VirtualDataTable​State with the specified name. Note that you will not call this constructor directly, new VirtualDataTable​State instances will be created only by TVirtualData​Table.​Create​State

    Methods

    Name Description
    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 This method returns if we have reached the last record in the table. The default implementation just sees if Position = RowCount. If RowCount is slow and you have a faster way to know if you are at the end, override this method.
    GetValue Overloaded
    GetValue(Integer)
    GetValue(Integer, Integer)
    MoveFirst This method is called when we want to move to the first record.
    You can always know the current record with Position
    MoveNext This method is called when we want to move to the next record.
    You can always know the current record with Position
    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.
    GetValueAndResync This method will be called when you need to ensure the position of the datasource is correct.
    Normally there is no need to do anything here, but for example TDataSet must ensure that the position of the TDataSet is the correct one, since a child might be using the same DataSet instance and have moved it.
    PushPhysicalPosition This method is called when we need to ensure the position in the dataset is correct. If the data is stateless (like an array), then this method can be empty. For data with state (like a TDataSet) you need to save the position of the physical dataset here and restore it in <#see PopPhysicalPosition>​.​
    PopPhysicalPosition This method is called when we need to ensure the position in the dataset is correct. If the data is stateless (like an array), then this method can be empty. For data with state (like a TDataSet) you need to save the position of the physical dataset in<#see PushPhysical​Position> and restore it here.
    CheckDuplicates This method will be called to let you find out if master datasources share the same internal data.
    There is normally no need to do anything here, but TDataSet needs to check if there are repeated instances.
    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.

    Properties

    Name Description
    TableData The VirtualDataTable that created this instance.
    Position Returns the active row on the table. (0 based) You should use this value to return the values on GetValue(​​Integer)
    TableName Returns the table name assigned on the template to this dataset. Note that this name is the one on the bands in the template.
    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 VCL and FireMonkey v7.24
    © 2002 - 2025 tmssoftware.com