Checks report item names to ensure that they are unique, not empty or null, and do not contain invalid characters.
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
.
var validator = new NameValidator();
bool isValid = validator.ValidateName("ReportItemName", NameType.Control);