VirtualDataTableState 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
Namespace: FlexCel.Report
public abstract class VirtualDataTableState: IDisposable
Constructors
Name | Description |
---|---|
VirtualDataTableState | Constructs a new VirtualDataTableState with the specified name. Note that you will not call this constructor directly, new VirtualDataTableState instances will be created only by VirtualDataTable.CreateState |
Destructors
Name | Description |
---|---|
Finalize | Finalizer for the class. |
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(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 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. |
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 | Overloaded Dispose Dispose(Boolean) |
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(Int32) |
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. |