See Also

ActiveReport Class  | ActiveReport Members  | DataInitialize  | FetchData  | Walkthrough: Unbound Reports  | Firing Sequence of Events

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports Send feedback to Data Dynamics

Fields Property

Returns the current data binding collection.  This collection contains the available Field objects to which the report controls and sections can be bound.

[Visual Basic]
Public ReadOnly Property Fields As FieldCollection
[C#]
public FieldCollection Fields {get;}

Remarks

ActiveReports initializes the collection with all the fields in the DataSource if any.  You can add custom unbound fields to the collection in the DataInitialize event.  This allows you to create custom calculated fields and bind the report sections and controls to fields not available through the data source but provided at run time in the FetchData event.   This allows the report to bind to collections, arrays or any other custom data structure that your application handles.

Note:  Do not reference the Fields collection outside the DataInitialize and FetchData events.

Example

[C#] 

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

    Fields.Add("CategoryName"); 
    Fields.Add("ProductName");     
    Fields.Add("UnitsInStock");         
    Fields.Add("Description"); 
}

[Visual Basic] 

Private Sub rptUnbound_DataInitialize(ByVal sender As Object, ByVal e As _
    System.EventArgs) Handles MyBase.DataInitialize
    Fields.Add("CategoryName")
    Fields.Add("ProductName")
    Fields.Add("UnitsInStock")
    Fields.Add("Description")
End Sub

See Also

ActiveReport Class  | ActiveReport Members  | DataInitialize  | FetchData  | Walkthrough: Unbound Reports  | Firing Sequence of Events

 

 


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