GrapeCity.ActiveReports.v9 Assembly > GrapeCity.ActiveReports Namespace > SectionReport Class : Fields Property |
'Declaration Public Property Fields As FieldCollection
public FieldCollection Fields {get; set;}
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.
private void rptUnbound_DataInitialize(object sender, System.EventArgs eArgs) { Fields.Add("CategoryName"); Fields.Add("ProductName"); Fields.Add("UnitsInStock"); Fields.Add("Description"); }
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
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