October 18, 2010 at 4:08 am
hi All,
I have a report which has a parameter's called startdate and Endate of DateTime datatype. if user selects the StartDate > EndDate or EndDate<StartDate i need to show the Error Message. please can any body help me to solve this problem
Thanks & regards
DeepaK.A
October 18, 2010 at 6:53 am
Instead you might want to make the end date dependant on the start date (cascading parameters) so that the end date can not be less than the start date.
October 18, 2010 at 7:16 am
Hi Daniel thanks for your reply can you please tel me how to set the cascade option im using SSRS 2008
October 19, 2010 at 7:44 am
You do it by making your available parameter values come from dependant queries. For example the available values for your enddate would come from a query something like:
SELECT datefield AS EndDate FROM TableWithDates WHERE datefield > @StartDate
You must make sure your @StartDate parameter is populated before the query in this case is run. You do that by moving your parameters up or down in the parameter list.
October 19, 2010 at 8:19 am
I would make the parameters dependent as others have suggested.
If you absolutely had to produce an error message, you could set a hidden boolean parameter (e.g. HIDE) and default that to True if the end_date < start date or start_date > end_date and then set the hidden property of all your report items = HIDE. Then, add a text box with your error message, and set the hidden property to !HIDE. So if the data params are wrong the error message will show and if they are ok, the results will show.
The main drawback to that is that it won't prevent your queries from running, so you will have to handle invalid parameters in your query as well.
October 19, 2010 at 10:53 pm
Daniel Bowlin (10/19/2010)
You do it by making your available parameter values come from dependant queries. For example the available values for your enddate would come from a query something like:SELECT datefield AS EndDate FROM TableWithDates WHERE datefield > @StartDate
You must make sure your @StartDate parameter is populated before the query in this case is run. You do that by moving your parameters up or down in the parameter list.
hi Daneil,
thanks for the reply once again , We are not taking the StartDate and EndDate from the query. users will select the Date from the calender, the requirement is to validate as soon as they select the invalid the date range between the StartDate and EndDate as popup
Regards,
Deepak.A
October 19, 2010 at 10:56 pm
Jay_Noob (10/19/2010)
I would make the parameters dependent as others have suggested.If you absolutely had to produce an error message, you could set a hidden boolean parameter (e.g. HIDE) and default that to True if the end_date < start date or start_date > end_date and then set the hidden property of all your report items = HIDE. Then, add a text box with your error message, and set the hidden property to !HIDE. So if the data params are wrong the error message will show and if they are ok, the results will show.
The main drawback to that is that it won't prevent your queries from running, so you will have to handle invalid parameters in your query as well.
hi Jay_Noob,
Thanks For your reply currently we are diong the same method to show the error message.
The requirement is to validate as soon as they select the invalid the date range between the StartDate and EndDate as popup
is that achievable in SSRS 2005/2008
Regards,
Deepak.A
January 4, 2012 at 4:21 am
Hi there, I am new to ssrs 2008 r2, please can you explain in detail.
Thanks in advance.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply