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

Glossary Item Box

Gets or sets the user-defined default value of the field, which is used if the formula or value is null.

Syntax

Visual Basic (Declaration) 
Public Property DefaultValue As System.String
C# 
public System.string DefaultValue {get; set;}

Example

C#Copy Code
private void rptCalFields_ReportStart(object sender, System.EventArgs e)
{
    this.field1.DefaultValue = "\"Does not compute\"";
    this.field1.FieldType = GrapeCity.ActiveReports.Data.FieldTypeEnum.None;
    this.field1.Formula = "ProductName + UnitPrice";
    this.field1.Name = "field1";
    this.field1.Tag = null;
}
Visual BasicCopy Code
Private Sub rptCalFields_ReportStart(ByVal sender As Object, ByVal e As System.EventArgs)
   Me.field1.DefaultValue = """Does not compute"""
   Me.field1.FieldType = GrapeCity.ActiveReports.Data.FieldTypeEnum.None
   Me.field1.Formula = "ProductName + UnitPrice"
   Me.field1.Name = "field1"
   Me.field1.Tag = Nothing
End Sub

See Also