Hi Experts,
I am trying to add a validation in my SSRS report's contract class to make sure the dates are selected properly. Below is my contract class and the methods in it. The validation is not working (Nothing happens when I select an invalid period) when I run the report ,can anyone help me with if I missed anything or what's wrong in it.
class XYZ implements SysOperationValidatable
{
TransDate FromDate,ToDate;
}
[DataMemberAttribute('From Date'),SysOperationLabelAttribute('From date :'),SysOperationDisplayOrderAttribute('1')]
public TransDate parmFromDate(TransDate _fromDate = FromDate)
{
FromDate = _fromDate;
return FromDate;
}
[DataMemberAttribute('To Date'),SysOperationLabelAttribute('To date :'),SysOperationDisplayOrderAttribute('2')]
public TransDate parmToDate(TransDate _toDate = ToDate)
{
ToDate = _toDate;
return ToDate;
}
public boolean validate()
{
boolean IsValid = true;
if (!FromDate || !ToDate || ToDate < FromDate)
IsValid = checkFailed("Invalid Date");
return IsValid;
}