How to set Default parameter for cascading parameter report?
I am trying to build a 2008 SSRS report so that it displays table based on start and end date parameters. But when I set the default values of these date parameters, it displays same records in my table regardless of what parameters I've chosen, since they are defaulted. So then I tried setting default values = available values, but this does the same thing. So how do I create cascading parameters so that table correctly filters based on date logic? I have three parameters: "Parameter_Week", "Start_Date", and "End Date". All of these come from the same dataset where Parameter Week is in string format of "6/12/11 - 6/18/11" and Start Date is "6/12/11" and End Date is "6/18/11". There are 4 different records from this same dataset, which are always equal to the last 4 weeks. And the table dataset only takes the second 2 parameters: Start and End Date. So I want this table to filter records based on these dates. However, I get the error below if I set Default values for these two parameters to "None". The 'Start Date' parameter is missing a value. (and Start and End Date parameters are Hidden, since only "Parameter Week" parameter should be visible.) So to summarize, I've tried every combination for setting the Default values for these two date parameters. If I set Default values = None, then I get the error message above. But if I set default to anything else, then it always returns same records in table since they are defaulted.Ryan Daulton
June 21st, 2011 7:29pm

Hi, Based on your description, the requirement to allow users to filter report data based the selected week, and the default week is null, correct? If I have something misunderstood, please point out. Since you have a dataset contains Week and StartDate and EndDate, in order to achieve the requirement, we only need to add one parameter to the report. For example, we can set the Available Values of the Week parameter to Get values from a query by the following configuration: Dataset: DataSetName Value field: StartDate Label field: Week To filter report data, we can refer to =Parameters!Week.Value to get the start date and use the expression =DateAdd("d",6,Parameters!Week.Value) as the end date. Generally, the default value needs to be contained in the available values. If you need to set the default value of the week parameter to null, please try to add one more record dataset. Thanks, Tony Chain Tony Chain [MSFT CSG] | Microsoft Community Support Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2011 9:01am

Great! That seemed to fix it! Thank you very much!Ryan Daulton
June 22nd, 2011 4:52pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics