How to add Validation on a Report Parameter to a Decimal point

  • Hello all!

    I have a parameter that will accept a discount rate as a float. We do not want users to enter a value that has more than 4 decimal places.

    4.5555 is good

    4.555555 would throw and error informing the user that only 4 decimal places can be entered.

    Is this something that is possible in RS 2005?

    Marty

  • If you want it to throw the error when they enter the value, then no. You could build the report dataset to do parameter validation and feedback an error to the report that when displayed on the report will tell the user what they did wrong.

    However I would probably make the parameter prompt a bit longer to indicate the number of allowed digits, and then simply truncate any input that did not follow the rules.

  • Hey Daniel,

    Where would you do the truncate...in the stored procedure that the parameter is passed to?

  • I would probably do it in the SP, yes.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply