ActiveReports Developer 7
Value Property
See Also  Example
GrapeCity.ActiveReports.v7 Assembly > GrapeCity.ActiveReports.Data Namespace > Field Class : Value Property

Glossary Item Box

Gets or sets the current value of the field object.

Syntax

Visual Basic (Declaration) 
Public Property Value As System.Object
C# 
public System.object Value {get; set;}

Example

C#Copy Code
private void rptUnbound_FetchData(object sender, GrapeCity.ActiveReports.ActiveReport.
    FetchEventArgs eArgs)
{
    try    
    {        
        m_reader.Read();        
        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;    
    }    
    catch    
    {        
        eArgs.EOF = true;    
    }
}
Visual BasicCopy Code
Private Sub rptUnbound_FetchData(ByVal sender As Object, ByVal eArgs As GrapeCity.ActiveReports.ActiveReport.FetchEventArgs) Handles MyBase.FetchData
      Try            
          m_reader.Read()            
          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