ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Core.Rdl Assembly / GrapeCity.ActiveReports.PageReportModel Namespace / NameValidator Class / ValidateName Method
A System.String value indicating the name to validate.
A NameType value indicating whether the name is for a control, dataset, data region, or grouping object.
Example

In This Topic
    ValidateName Method
    In This Topic
    Checks report item names to ensure that they are unique, not empty or null, and do not contain invalid characters.
    Syntax
    'Declaration
     
    Public Function ValidateName( _
       ByVal name As String, _
       ByVal nameType As NameType _
    ) As Boolean
    public bool ValidateName( 
       string name,
       NameType nameType
    )

    Parameters

    name
    A System.String value indicating the name to validate.
    nameType
    A NameType value indicating whether the name is for a control, dataset, data region, or grouping object.

    Return Value

    A System.Booleanvalue. true if the name is valid; otherwise false.
    Example
    var validator = new NameValidator();
    bool isValid = validator.ValidateName("ReportItemName", NameType.Control);
    See Also