Search Results for

    Show / Hide Table of Contents

    FlexCelReport.AddTable Method

    Overloads

    • FlexCelReport.AddTable(DataSet)
    • FlexCelReport.AddTable(String, DataTable)
    • FlexCelReport.AddTable(String, DataView)
    • FlexCelReport.AddTable(DataSet, TDisposeMode)
    • FlexCelReport.AddTable(String, VirtualDataTable)
    • FlexCelReport.AddTable<T>(String, IEnumerable<T>)
    • FlexCelReport.AddTable(String, DataTable, TDisposeMode)
    • FlexCelReport.AddTable(String, DataView, TDisposeMode)
    • FlexCelReport.AddTable(String, VirtualDataTable, TDisposeMode)
    • FlexCelReport.AddTable<T>(String, IEnumerable<T>, TDisposeMode)

    FlexCelReport.AddTable(DataSet)

    Use this method to load all tables on a dataset at once. This is equivalent to calling AddTable(String, DataTable) for each of the tables on the dataset.

    Syntax

    Namespace: FlexCel.Report

    public void AddTable(DataSet tables)

    Parameters

    <-> Parameter Type Description
    tables DataSet Dataset containing the tables to add.

    Examples

    See AddTable(String, DataTable) for an example.

    See also

    • FlexCelReport

    FlexCelReport.AddTable(String, DataTable)

    Use this method to tell FlexCel which DataTables or DataViews are available for the report. Note: If you don't know the tables before running the report (and you are not using User Tables or Direct SQL) you can use the LoadTable event to load them in demand instead of using AddTable. This way you will only load the tables you need.

    Syntax

    Namespace: FlexCel.Report

    public void AddTable(String tableName, DataTable table)

    Parameters

    <-> Parameter Type Description
    tableName String Name that the table will have on the report.
    table DataTable Table that will be available to the report.

    Examples

    To allow a report to use Customers and Orders tables, you can use the code:

        flexCelReport.AddTable("Customers", CustomersDataTable); //Add datatable Customers to the report.
        flexCelReport.AddTable("Orders", OrdersDataView); //Add dataview OrdersDataView to the report.
        flexCelReport.AddTable(MyDataSet); //Add all the tables on MyDataSet to the report.
    

    See also

    • FlexCelReport

    FlexCelReport.AddTable(String, DataView)

    Use this method to tell FlexCel which DataTables or DataViews are available for the report. Note: If you don't know the tables before running the report (and you are not using User Tables or Direct SQL) you can use the LoadTable event to load them in demand instead of using AddTable. This way you will only load the tables you need.

    Syntax

    Namespace: FlexCel.Report

    public void AddTable(String tableName, DataView table)

    Parameters

    <-> Parameter Type Description
    tableName String Name that the table will have on the report.
    table DataView Table that will be available to the report.

    Examples

    To allow a report to use Customers and Orders tables, you can use the code:

        flexCelReport.AddTable("Customers", CustomersDataTable); //Add datatable Customers to the report.
        flexCelReport.AddTable("Orders", OrdersDataView); //Add dataview OrdersDataView to the report.
        flexCelReport.AddTable(MyDataSet); //Add all the tables on MyDataSet to the report.
    

    See also

    • FlexCelReport

    FlexCelReport.AddTable(DataSet, TDisposeMode)

    Use this method to load all tables on a dataset at once. When disposeMode is DoNotDispose, this is equivalent to calling AddTable(String, DataTable) for each of the tables on the dataset. If disposeMode is DisposeTable, this will make the same as calling AddTable() with disposeTable equal to false for each table on the dataset. And when finished, all the dataset will be disposed.

    Syntax

    Namespace: FlexCel.Report

    public void AddTable(DataSet tables, TDisposeMode disposeMode)

    Parameters

    <-> Parameter Type Description
    tables DataSet Dataset containing the tables to add.
    disposeMode TDisposeMode When disposeMode is TDisposeMode.DisposeTable, FlexCel will take care of disposing this dataset after running the report. Use it when adding datasets created on the fly, so you do not have to dispose them yourself.

    Examples

    See AddTable(String, DataTable) for an example.

    See also

    • FlexCelReport

    FlexCelReport.AddTable(String, VirtualDataTable)

    Use this method to add any custom object as a datasource for FlexCel. Make sure to read 'Appendix virtual datasets' in the Reports Developer Guide.

    Syntax

    Namespace: FlexCel.Report

    public void AddTable(String tableName, VirtualDataTable table)

    Parameters

    <-> Parameter Type Description
    tableName String Name that the table will have on the report.
    table VirtualDataTable Table that will be available in the report.

    See also

    • FlexCelReport

    FlexCelReport.AddTable<T>(String, IEnumerable<T>)

    Use this method to add any IEnumerable as a datasource for FlexCel. You can use this method to add LINQ tables.

    Syntax

    Namespace: FlexCel.Report

    public void AddTable<T>(String tableName, IEnumerable<T> table)

    Parameters

    <-> Parameter Type Description
    tableName String Name that the table will have on the report.
    table IEnumerable<T> Table that will be available in the report.

    Type Parameters

    Type Parameter Description
    T Type of table being inserted. It must implement IEnumerable.

    See also

    • FlexCelReport

    FlexCelReport.AddTable(String, DataTable, TDisposeMode)

    Use this method to tell FlexCel which DataTables or DataViews are available for the report. Note: If you don't know the tables before running the report (and you are not using User Tables or Direct SQL) you can use the LoadTable event to load them in demand instead of using AddTable. This way you will only load the tables you need.

    Syntax

    Namespace: FlexCel.Report

    public void AddTable(String tableName, DataTable table, TDisposeMode disposeMode)

    Parameters

    <-> Parameter Type Description
    tableName String Name that the table will have on the report.
    table DataTable Table that will be available to the report.
    disposeMode TDisposeMode When disposeMode is TDisposeMode.DisposeTable, FlexCel will take care of disposing this table after running the report. Use it when adding tables created on the fly, so you do not have to dispose them yourself.

    Examples

    To allow a report to use Customers and Orders tables, you can use the code:

        flexCelReport.AddTable("Customers", CustomersDataTable); //Add datatable Customers to the report.
        flexCelReport.AddTable("Orders", OrdersDataView); //Add dataview OrdersDataView to the report.
        flexCelReport.AddTable(MyDataSet); //Add all the tables on MyDataSet to the report.
    

    See also

    • FlexCelReport

    FlexCelReport.AddTable(String, DataView, TDisposeMode)

    Use this method to tell FlexCel which DataTables or DataViews are available for the report. Note: If you don't know the tables before running the report (and you are not using User Tables or Direct SQL) you can use the LoadTable event to load them in demand instead of using AddTable. This way you will only load the tables you need.

    Syntax

    Namespace: FlexCel.Report

    public void AddTable(String tableName, DataView table, TDisposeMode disposeMode)

    Parameters

    <-> Parameter Type Description
    tableName String Name that the table will have on the report.
    table DataView Table that will be available to the report.
    disposeMode TDisposeMode When disposeMode is TDisposeMode.DisposeTable, FlexCel will take care of disposing this table after running the report. Use it when adding tables created on the fly, so you do not have to dispose them yourself.

    Examples

    To allow a report to use Customers and Orders tables, you can use the code:

        flexCelReport.AddTable("Customers", CustomersDataTable); //Add datatable Customers to the report.
        flexCelReport.AddTable("Orders", OrdersDataView); //Add dataview OrdersDataView to the report.
        flexCelReport.AddTable(MyDataSet); //Add all the tables on MyDataSet to the report.
    

    See also

    • FlexCelReport

    FlexCelReport.AddTable(String, VirtualDataTable, TDisposeMode)

    Use this method to add any custom object as a datasource for FlexCel. Make sure to read 'Appendix virtual datasets' in the Reports Developer Guide.

    Syntax

    Namespace: FlexCel.Report

    public void AddTable(String tableName, VirtualDataTable table, TDisposeMode disposeMode)

    Parameters

    <-> Parameter Type Description
    tableName String Name that the table will have on the report.
    table VirtualDataTable Table that will be available in the report.
    disposeMode TDisposeMode When disposeMode is TDisposeMode.DisposeTable, FlexCel will take care of disposing this table after running the report. Use it when adding tables created on the fly, so you do not have to dispose them yourself.

    See also

    • FlexCelReport

    FlexCelReport.AddTable<T>(String, IEnumerable<T>, TDisposeMode)

    Use this method to add any IEnumerable as a datasource for FlexCel. You can use this method to add LINQ tables.

    Syntax

    Namespace: FlexCel.Report

    public void AddTable<T>(String tableName, IEnumerable<T> table, TDisposeMode disposeMode)

    Parameters

    <-> Parameter Type Description
    tableName String Name that the table will have on the report.
    table IEnumerable<T> Table that will be available in the report.
    disposeMode TDisposeMode When disposeMode is TDisposeMode.DisposeTable, FlexCel will take care of disposing this table after running the report. Use it when adding tables created on the fly, so you do not have to dispose them yourself.

    Type Parameters

    Type Parameter Description
    T Type of the table.

    See also

    • FlexCelReport
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com