One of our client wanted to validate SSRS parameters.If parameter is “Non-Alphanumeric”, then we need to write the message saying that “You have entered the Non Alphanumeric data [Value entered in the parameter], which is invalid” We have achieved as follows. Otherwise report should return the data properly.
We have added the Text box in the SSRS report body and entered the following expression.
= IIF(Parameters!Param1.Value like "*[a-z][0-9]*" OR Parameters!Param1.Value like "*[0-9][a-z]*",string.Empty,string.Format("You have entered the Non Alphanumeric data [{0}], which is invalid",Parameters!Param1.Value))
Take a look at the following screenshot.
Thanks
Gowdhaman
No comments:
Post a Comment