Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Parameters Validation: End greater than Start

Author  Topic 

HockeyFan
Starting Member

26 Posts

Posted - 2008-07-17 : 16:44:59
Is there a way to validate parameters up front, to make sure that an end date is greater than or equal to the start date? Both of these are parameters.

dexter.knudson
Constraint Violating Yak Guru

260 Posts

Posted - 2008-07-17 : 18:34:23
Create another parameter with a default value of something like =iif (Parameters!endDate.value < Parameters!startDate.value,"Please make the end date greater than the start date","").
Go to Top of Page

HockeyFan
Starting Member

26 Posts

Posted - 2008-07-17 : 20:53:37
quote:
Originally posted by dexter.knudson

Create another parameter with a default value of something like =iif (Parameters!endDate.value < Parameters!startDate.value,"Please make the end date greater than the start date","").


Great idea. So how do I keep this third parameter from being updated by the user? Can it end up being some kind of read-only parameter? And also, is there a way to conditionally show it?
Go to Top of Page

dexter.knudson
Constraint Violating Yak Guru

260 Posts

Posted - 2008-07-17 : 21:09:48
If you set the label of the param to a blank space, it doesn't appear & they can't update it. But then the users don't see the msg. mmmm
Go to Top of Page

dexter.knudson
Constraint Violating Yak Guru

260 Posts

Posted - 2008-07-17 : 21:12:21
It's trying to work against the flow a little. What I do is display all the params in the header of the report, then they can see if they have done something wrong.
Go to Top of Page
   

- Advertisement -