ActiveReports 9
DataSource Property (SectionReport)
Example 

Gets or sets the data source from which the report will retrieve data.
Syntax
'Declaration
 
Public Property DataSource As System.Object
public System.object DataSource {get; set;}

Property Value

An object that functions as a data source.
Remarks

The data source can be set to any of the ActiveReports built-in data sources or to any of the following:

 

You cannot change the data source property settings after the report starts processing.

Example
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";
}
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
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SectionReport Class
SectionReport Members
DataMember Property

 

 


Copyright © 2014 GrapeCity, inc. All rights reserved

Support Forum