Reporting services validating parameters

Here if we define the Days parameter of type Integer and if we enter say for e.g.value = ‘x’ over there We will get the following error message.You are currently viewing the BOOK: Professional Microsoft SQL Server 2012 Reporting Services section of the Wrox Programmer to Programmer discussions.

reporting services validating parameters-83reporting services validating parameters-90

Raise(6, Report) 'Raise an overflow End If End Functionstep2) created a hidden parameter "@validate" and set its default to=CODE. I have tried using the code itself , it is working but still Im not satisfied... As you told I have used a hidden parameter then from there I called the function. Raise(6, Report) the return value is not a string type so that the parameter is not getting the value, ie the validation of the hidden paramter is not satisfied and so the report wont run this is what we need.

But the problem is it will show a message as the validation failed for the parameter...

Parameter Validation on web application is almost must all the time.

Usually developer use javascript or server side script validation.

However, although SQL Server Reporting Service (SSRS) is a web app but as a default it does not have parameter (user input) validation.

We have to write a Code at Report Properties Menu and implement it on Report Parameter. Apply validation on the from date and the to date parameter of SSRS.(The From date should be less than the To date.)For this we need to go SSRS report (RDL file) where we need to implement the same validation.Besides that, I created a regular expression to check if a text is entered properly.If the condition evaluates to "No", the report is not shown and a mesage appears.And if we upload the same report in the CRM, we will get the following error message, which doesn’t seem that user friendly.

Tags: , ,