Groups | Blog | Home
all groups > sql server reporting services > october 2005 >

sql server reporting services : Validation of Report Parameter


Atina
10/12/2005 10:08:03 PM
I have a report generated using Reporting Services that contains a report
parameter of integer datatype. I was asked to put a "validation" on the
report parameter to accept only numeric data. The RS used to crash if any
alphanumeric data was input in the report parameter textbox.
Basically, I have to block the ability for the user to search for records if
the data entered in the report parameter is not numeric. In short if a user
enters any data, which is not numeric, then the report parameter should be
validated and an error message should be displayed.
How do I provide a validation on the report parameter in MS Reporting
Services so that it does not give an ‘rsParameterTypeMismatch’ Reporting
Services error? Is it possible to provide any validation on the 'View Report'
button ?

Any help will be really appreciated. Thanks.
RobKaratzas
10/13/2005 4:24:02 AM
Yes, the Report Parameters have a Data Type, Available values and Default
Values properties.

right-click in the whitespace to the left of your report in Layout view
(VS.NET), or directly from the SSRS browser for the report.

Select your parameter from the Parameters list in the applet and modify your
parameter to be integer or float as appropriate.

Rob

[quoted text, click to view]
Atina
10/17/2005 5:34:02 AM
Hi Rob.
Thanks for responding.
But I have a slightly differnt problem. My report is already deployed on
the server. User can select a report to view from application. The report is
displayed on the page in the "Report viewer" control on the page. But in the
report viewer user can modify the report parameters. If user enters string
value for integer value, then reporting services gives error message
"rsParameterTypeMismatch".

Is there any facility to catch that exception? OR
To validate the report parameter value at the runtime?

Atina.

[quoted text, click to view]
AddThis Social Bookmark Button