Class TableDataSource
Represents a datasource based on DataTable class.
Inheritance
System.Object
TableDataSource
Assembly: FastReport.Base.dll
Syntax
public class TableDataSource : DataSourceBase, IDisposable, IFRSerializable, IParent
Examples
This example shows how to add a new table to the existing connection:
Report report1;
DataConnectionBase conn = report1.Dictionary.Connections.FindByName("Connection1");
TableDataSource table = new TableDataSource();
table.TableName = "Employees";
table.Name = "Table1";
conn.Tables.Add(table);
Constructors
TableDataSource()
Initializes a new instance of the TableDataSource class with default settings.
Declaration
Properties
Connection
Declaration
public DataConnectionBase Connection { get; set; }
Property Value
Parameters
Gets a collection of parameters used by "select" command.
Declaration
public CommandParameterCollection Parameters { get; set; }
Property Value
QbSchema
Gets or sets the query builder schema.
Declaration
public string QbSchema { get; set; }
Property Value
Type |
Description |
System.String |
|
SelectCommand
Gets or sets SQL "select" command.
Declaration
public string SelectCommand { get; set; }
Property Value
Type |
Description |
System.String |
|
Remarks
StoreData
Gets or sets a value that determines whether it is necessary to store table data in a report file.
Declaration
public bool StoreData { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Table
Gets or sets the underlying DataTable object.
Declaration
public DataTable Table { get; set; }
Property Value
Type |
Description |
DataTable |
|
TableData
Gets or sets the table data.
Declaration
public virtual string TableData { get; set; }
Property Value
Type |
Description |
System.String |
|
TableName
Gets or sets the table name.
Declaration
public string TableName { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
AddChild(Base)
Declaration
public override void AddChild(Base child)
Parameters
Type |
Name |
Description |
Base |
child |
|
Overrides
CanContain(Base)
Declaration
public override bool CanContain(Base child)
Parameters
Type |
Name |
Description |
Base |
child |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
Overrides
GetChildObjects(ObjectCollection)
Declaration
public override void GetChildObjects(ObjectCollection list)
Parameters
Overrides
GetValue(Column)
Declaration
protected override object GetValue(Column column)
Parameters
Type |
Name |
Description |
Column |
column |
|
Returns
Type |
Description |
System.Object |
|
Overrides
InitializeComponent()
Declaration
public override void InitializeComponent()
Overrides
InitSchema()
Declaration
public override void InitSchema()
Overrides
InitSchemaAsync(CancellationToken)
Declaration
public override async Task InitSchemaAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
LoadData(ArrayList)
Declaration
public override void LoadData(ArrayList rows)
Parameters
Type |
Name |
Description |
System.Collections.ArrayList |
rows |
|
Overrides
LoadDataAsync(ArrayList, CancellationToken)
Declaration
public override async Task LoadDataAsync(ArrayList rows, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Collections.ArrayList |
rows |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
RefreshTable()
Refresh the table schema.
Declaration
public void RefreshTable()
RefreshTableAsync(CancellationToken)
Refresh the table schema.
Declaration
public async Task RefreshTableAsync(CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
RemoveChild(Base)
Declaration
public override void RemoveChild(Base child)
Parameters
Type |
Name |
Description |
Base |
child |
|
Overrides
Serialize(FRWriter)
Declaration
public override void Serialize(FRWriter writer)
Parameters
Overrides
SetParent(Base)
Declaration
public override void SetParent(Base value)
Parameters
Type |
Name |
Description |
Base |
value |
|
Overrides
Implements