Search Results for

    Show / Hide Table of Contents

    FlexCelReport.AddRelationship Method

    Overloads

    • FlexCelReport.AddRelationship(String, String, String, String)
    • FlexCelReport.AddRelationship(String, String, String[], String[])

    FlexCelReport.AddRelationship(String, String, String, String)

    Adds a relationship between two tables. Note that if your tables are datasets, or come from Entity Framework, or your master detail tables are nested, you probably don't need to call this method. FlexCel will detect the relationships automatically and use them. This method is only for when you have custom data with no DataRelationships (as in a dataset) and where detail tables are not nested to the master (as in Entity Framework).

    Remarks

    You might use this method before adding the tables with AddTable. Tables must exist when running the report, not when adding the relationship.

    Syntax

    Namespace: FlexCel.Report

    public void AddRelationship(String masterTable, String detailTable, String masterKeyFields, String detailKeyFields)

    Parameters

    <-> Parameter Type Description
    masterTable String Master table for the relationship.
    detailTable String Detail table for the relationship.
    masterKeyFields String Key fields in the master table that relate with the key fields in the detail table.
    Must not be null, and normally will be an array with a single field. It must be the same length as detailKeyFields/>
    detailKeyFields String Key fields in the detail table that relate with the key fields in the master table.
    Must not be null, and normally will be an array with a single field.

    See also

    • FlexCelReport

    FlexCelReport.AddRelationship(String, String, String[], String[])

    Adds a relationship between two tables. Note that if your tables are datasets, or come from Entity Framework, or your master detail tables are nested, you probably don't need to call this method. FlexCel will detect the relationships automatically and use them. This method is only for when you have custom data with no DataRelationships (as in a dataset) and where detail tables are not nested to the master (as in Entity Framework).

    Remarks

    You might use this method before adding the tables with AddTable. Tables must exist when running the report, not when adding the relationship.

    Syntax

    Namespace: FlexCel.Report

    public void AddRelationship(String masterTable, String detailTable, String[] masterKeyFields, String[] detailKeyFields)

    Parameters

    <-> Parameter Type Description
    masterTable String Master table for the relationship.
    detailTable String Detail table for the relationship.
    masterKeyFields String[] Key fields in the master table that relate with the key fields in the detail table.
    Must not be null, and normally will be an array with a single field. It must be the same length as detailKeyFields/>
    detailKeyFields String[] Key fields in the detail table that relate with the key fields in the master table.
    Must not be null, and normally will be an array with a single field.

    See also

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