question

baijumohan avatar image
baijumohan asked

add validations in ssrs

I have a ssrs report which have start date and end date as input fields. i need to throw a validation if end date is greater than start date. how to do it?
ssrssqlservermsbi
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
David Wimbush avatar image
David Wimbush answered
Put this at the start of your stored procedure: if @EndDate < @StartDate begin raiserror('EndDate cannot be earlier than StartDate.', 16,1); return; end The return will stop the procedure from continuing.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.