Implementing validation in reports
Validations are important to ensure the integrity of the process. Here, in this recipe, let's see how we can implement validations for reports.
Getting ready
The sample discussed is extending the InventBatch report discussed in the Creating an advanced RDP report recipe in Chapter 4, Report Programming Model – RDP.
How to do it…
To make a parameter mandatory, in the report model in Visual Studio, expand and open the parameter that you wish to make mandatory. In the Properties node, ensure that the AllowBlank property is False. Modify it to True if the parameter needs to be optional. This property by default is False, so any property is mandatory by default. Also, you can set Default Value if you want. This is particularly useful for Boolean type parameters where the default value can be True in some cases.
Sometimes the validations go beyond verifying mandatory. In that case, the validate operation must be implemented in the contract. As we have seen in previous...