combit List & Label 29 - .NET Help
combit.Reporting.DataProviders Namespace / IDataProvider Interface / GetRelation Method
The name of the relation to return. The parameter relationName can also contain a relation name that is not available in the data provider (e.g. in combination with the usage of a DataProviderCollection). In this case the return value of the method has to be null.
Example


In This Topic
    GetRelation Method
    In This Topic
    This method is called whenever a relation is queried from the data provider.
    Syntax
    'Declaration
     
    
    Function GetRelation( _
       ByVal relationName As String _
    ) As ITableRelation

    Parameters

    relationName
    The name of the relation to return. The parameter relationName can also contain a relation name that is not available in the data provider (e.g. in combination with the usage of a DataProviderCollection). In this case the return value of the method has to be null.
    Example
    ITableRelation GetRelation(string relationName)
    {
        // DataRelationWrapper needs to implement ITableRelation
        return new DataRelationWrapper(_dataViewManager.DataSet.Relations[relationName]);
    }
    Function GetRelation(relationName As String) As ITableRelation
        ' DataRelationWrapper needs to implement ITableRelation 
        Return New DataRelationWrapper(_dataViewManager.DataSet.Relations(relationName))
    End Function
    Requirements

    Platforms: Windows 10 (Version 21H2 - 23H2), Windows 11 (21H2 - 22H2), Windows Server 2016 - 2022
    .NET: .NET Framework 4.8, .NET 6, .NET 7, .NET 8

    See Also