See Also

ActiveReport Class  | ActiveReport Members  | DataSource  | Walkthrough: Data Set Windows Application

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports Send feedback to Data Dynamics

DataMember Property

Gets or sets the specified list in a DataSource to which the report will bind.

[Visual Basic]
Public Property DataMember As String
[C#]
public string DataMember {get; set;}

Remarks

Default is an empty string.

If a data source, such as a data set, contains multiple lists, you must set the DataMember to a list contained in the data source.  The ActiveReports built-in data sources always contain a single data source, hence do not require that this property be set.

Example

[C#] 

private void rptProducts_ReportStart(object sender, System.EventArgs eArgs) 

    rptProducts rpt = new rptProducts(); 
    localhost.DataSetWS ws = new localhost.DataSetWS(); 
    DataSet ds = ws.GetProduct();  
    this.DataSource = ds; 
    this.DataMember = "Products"; 
}

[Visual Basic] 

Private Sub rptProducts_ReportStart(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.ReportStart
    Dim rpt As New rptProducts()
    Dim ws As New localhost.DataSetWS()
    Dim ds As New DataSet()
    ds = ws.GetProduct()
    Me.DataSource = ds
    Me.DataMember = "Products"
End Sub

See Also

ActiveReport Class  | ActiveReport Members  | DataSource  | Walkthrough: Data Set Windows Application

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.