SSRS default values for parameters

  • Hi I've got a report where the users need to select 2 dates, start and end. When I specify the parameter with a data type of date/time, it works perfectly. The only problem is that my data goes back to 1996 and therefor I would like to specify a default value of these 2 parameters. Should be easy should it not. Well not for me.

    When you specify a second dataset with the following SQL in,

    (

    SELECT top 1 CAST(Time_FirstDayOfMonth AS date) AS FirstDayOfMonth,

    CAST(Time_LastDayOfMonth AS date) AS LastDayOfMonth

    FROM Dim_Time

    WHERE (Time_DateFull = CAST(dateadd("M", -1, GETDATE()) AS DATE))

    ) (Have also tried cast to datetime and smalldatetime)

    the parameter now changes from a date control to a drop down box. The correct value for the control is selected, in this case start of 2011/12/01, which is what I want, but I want the control to stay a date control and not a list control.

    Even if you add a default value, hard code it, it still decides to change it to a list box.

    Please how the %@#^$ do I get a default value in a date/time control?! :w00t:

  • It seems that the dataset I’m using to bring back the available values is causing this behaviour. It returns the values as datetime (ive also tried using cast to date, datetime and smalldatetime), but as soon as I take out the available value and only specify the default value from my dataset, it give the correct default value, it’s just that the data is not limited to the available values.

    I’m sure the users can live with that

Viewing 2 posts - 1 through 1 (of 1 total)

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