ActiveReports 12
FetchData Event

GrapeCity.ActiveReports.v12 Assembly > GrapeCity.ActiveReports Namespace > SectionReport Class : FetchData Event
Raised every time a new record is processed.
Public Event FetchData As SectionReport.FetchEventHandler
public event SectionReport.FetchEventHandler FetchData
Event Data

The event handler receives an argument of type SectionReport.FetchEventArgs containing data related to this event. The following SectionReport.FetchEventArgs properties provide information specific to this event.


This parameter is passed by reference and its default Value is True.  It has to be explicitly set to False for the report to continue processing more records when the report is unbound. For bound reports, the EOF property is set automatically.


This event is used to set the values of custom unbound fields that were added in the DataInitialize event.

ActiveReports does not null unbound field values before firing this event.  The unbound field value is carried over so you should always set the values of all unbound fields in this event.

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

private void rptUnbound_FetchData(object sender, GrapeCity.ActiveReports.ActiveReport.
    FetchEventArgs eArgs)
        Fields["CategoryName"].Value = m_reader["CategoryName"].ToString();        
        Fields["ProductName"].Value = m_reader["ProductName"].ToString();        
        Fields["UnitsInStock"].Value = m_reader["UnitsInStock"].ToString();        
        Fields["Description"].Value = m_reader["Description"].ToString();        
        eArgs.EOF = false;    
        eArgs.EOF = true;    
Private Sub rptUnbound_FetchData(ByVal sender As Object, ByVal eArgs As DataDynamics._
      ActiveReports.ActiveReport.FetchEventArgs) Handles MyBase.FetchData
          Me.Fields("CategoryName").Value = m_reader("CategoryName")            
          Me.Fields("ProductName").Value = m_reader("ProductName")            
          Me.Fields("UnitsInStock").Value = m_reader("UnitsInStock")            
          Me.Fields("Description").Value = m_reader("Description")               
          eArgs.EOF = False               
          Catch ex As Exception            
          eArgs.EOF = True        
      End Try    
End Sub
See Also