How to create date range parameter in RS2005?

  • Hi folks,

    I have created to parameter. @StartDate and @EndDate withe this statement:

    Select * From table where ENTRY_D BETWEEN @StartDate and @EndDate.

    Firstly i want the dates select-able from calendar would be older or equals to today. Greyed out those after today.

    Secondly what can i do so that their selection of EndDate parameter would not be older(must be later) than what they have selected in StartDate parameter?

    Lastly how to assign default values to @startDate as MIN(ENTRY_D) and default values to @endDate as MAX(ENTRY_D)? My ENTRYDATE is in m/d/yyyy hh:mm:ss format.

    Is all these possible? If it is, anyone has article or tutorial on this? Or anyone willing to guide me through?

    Thanks,

    10e5x

  • None of this is possible out of the box SSRS.

    If you want available dates you can use a query and populate the parameter, however it changes the control to a listbox, and not a calendar control.

    and other than code you cannot validate dates.

    Similar thread

    http://www.sqlservercentral.com/Forums/Topic537763-145-1.aspx

  • Thanks Ray for the information. Maybe i am too use to asp.net, thinking every report should have all these. Btw what about search functions? Read the thread too.

    Btw in any case, search functions are possible. Meaning i have a textbox with a button in the report. And i can do a search on the displayed data

    Btw u helped me alot since my earlier post. Thanks. Appreciated ur help:)

    Update: From the link u provided, i derived a similar solutions to my question for the date range selection. Thanks for your help.

  • The Report viewer has a search function built in. In the bar with the export icon and such there's a search textbox and link that works for this.

    Happy to help

Viewing 4 posts - 1 through 3 (of 3 total)

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