I have implemented a SSRS 2008 report which has a parameter embed_id
which is supposed to be numeric. I have also added a validation code to check if the entered embed_id
is valid (numeric) or not.
A stored procedure is used to fetch the report data. When I enter some letters like abc
in the embed_id
textbox, validation code correctly returns false but SP execution still takes place giving the following error on UI -
Query execution failed for dataset 'embed'. Invalid column name 'abc'.
I have added a red colored message showing custom text like "Embed ID is not valid" but that is not shown in this case.
Is there a way to cancel SP execution on the validation error? Or am I supposed to handle it within SP itself such that SP returns zero rows on receiving such invalid input?